Stackless Python, eventual merge?

Christian Tismer tismer at
Thu Sep 19 09:10:05 EDT 2002

Martin v. Löwis wrote:
> Thomas Heller <theller at> writes:
>>>That is not true. It is more reliable to inspect the source code.
>>>In general, it is very easy to do so: if there are no callbacks to
>>>Python, the module is stackless-safe.
>>So win32all probably wxPython are incompatible with stackless?
> No. If a module has callbacks, it is thread safe if it does not put
> data on the stack whose addresses are used outside the function, and
> it does not use setjmp, and it does not use exception handling.

Maybe sufficient for not crashing on the C level.
But this is not enough for micro-thread-safety.
See the random module for example, it needs a lock
or it will give unpredictable results.

ciao - chris

Christian Tismer             :^)   <mailto:tismer at>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a     :    *Starship*
14109 Berlin                 :     PGP key ->
work +49 30 89 09 53 34  home +49 30 802 86 56  pager +49 173 24 18 776
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?

More information about the Python-list mailing list