Learning to use threads.

Peter Hansen peter at engcorp.com
Sun Jan 26 12:29:31 EST 2003


Grumfish wrote:
> 
> Peter Hansen wrote:
> > If, however, this custom method starts directly manipulating data
> > in the thread object, you could quickly get into trouble if you
> > don't know about thread synchronization issues.
> 
> What if the only thing the method changes in the thread object is a
> Queue. Is that safe?

Yes.  (Although as an engineer I'm obliged to point out to you that 
without knowing the details of your requirements, and seeing your
actual code, I'm not providing advice which takes into account
all the special nuances of your application and you shouldn't rely
on my confirmation in applications involving life safety, or where
mistakes could cause material loss or affect the public health, 
blah blah blah.  ;-)  )

-Peter




More information about the Python-list mailing list