Problems with Threads

Mark Hammond MarkH at ActiveState.com
Fri Aug 10 05:11:26 EDT 2001


Alexandre Perrin wrote:
> I had the same problem recently... In fact, it mainly depends on the 
> kind of thread you are using.
> I'm using Windows and I know that Win32 threads are incompatible with 
> Python (because the Python API is single-threaded), but I heard that 
> POSIX threads work fine.

I don't know what you are trying to say, but Win32 threads are 
completely compatible with Python - indeed, Python on Win32 uses Win32 
threads to implement all threading functionality in the language.  The 
COM support also demonstrates that arbitary threads (ie, those created 
externally from Python) work just fine.

> PS: I also noticed that the different interpreter (Python Idle and
> Pythonwin) are using threads differently...

I'm also not sure what you mean here.  GUI environments do have some 
threading issues, but ultimately all the different threading APIs 
(exposed via the modules thread, threading and win32ui) all boil down to 
pretty much the same thing...

Mark.




More information about the Python-list mailing list