Threading modeule and condition??
Christopher T King
squirrel at WPI.EDU
Fri Jul 23 22:41:40 CEST 2004
On 23 Jul 2004, David Bolen wrote:
> 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.
That's more what I was getting at, "make sure you create one and pass it
to all your threads instead of creating different ones in each thread".
Poor wording on my part.
More information about the Python-list