Threading modeule and condition??

David Bolen db3l at fitlinxx.com
Fri Jul 23 16:35:37 EDT 2004


Christopher T King <squirrel at WPI.EDU> writes:

> Just make sure you do this _before_ creating your threads, so that the 
> object is shared by all the threads when they are created.

Order of creation shouldn't make any difference.  Condition objects
(as all of the synchronization objects built on top of the lock
primitive) exist independent of thread's per-se.  They are designed
for use from multiple-threads, so it doesn't matter if they are
created before or after the threads that use them, although obviously
you need to hand the threads references to the objects they are going
to use.

-- David



More information about the Python-list mailing list