Stackless Python and Python 2.x

Courageous jkraska at san.rr.com
Sun Sep 2 14:25:36 EDT 2001


>The advantages over real threads are enormous:
> - lightweight

This can be a real issue if you begin running enough
threads where context-switching speed begins to matter.

> - system level locks never needed
> - user level locks rarely needed
>
>The only downside is relatively minor - I have to make
>sure that one "thread" doesn't monopolize the CPU.

One alternative is to use one or more real threads to
manage your continuation-threads. As your executive
thread is preemptively threaded, it can possibly
terminate unresponsive c-threads.

C//




More information about the Python-list mailing list