Concurrent tasklets in Stackless Python

Chris Rebert clp2 at rebertia.com
Mon Mar 9 20:15:39 EDT 2009


On Mon, Mar 9, 2009 at 4:47 PM, Minesh Patel <minesh at gmail.com> wrote:
> On Mon, Mar 9, 2009 at 3:17 PM, Chris Rebert <clp2 at rebertia.com> wrote:
>> On Mon, Mar 9, 2009 at 3:05 PM, Minesh Patel <minesh at gmail.com> wrote:
>>> Is there a way for multiple tasklets to run in parallel?
>>
>> Seems doubtful (though I'm not an expert).
>>
>> From the Wikipedia article: "Stackless microthreads are managed by the
>> language interpreter itself, not the operating system kernel—context
>> switching and task scheduling is done purely in the interpreter. "
>>
>> This suggests that only one microthread is ever really being run at
>> any given time. I would venture a guess that the lack of "true"
>> parallel-ness is probably a design decision deeply ingrained into
>> Stackless and is not changeable. You'd probably have to change to
>> multiprocessing or threads.
>>
>
> Thanks Chris,
> Can you suggest any Python libraries for true parallelism or should I
> just stick with Python Threads or asyncore

My knowledge of parallelism is rather limited; I'm not qualified to
make such a recommendation. I'm sure someone else on the mailinglist
will be able to answer though.

Cheers,
Chris

-- 
I have a blog:
http://blog.rebertia.com



More information about the Python-list mailing list