Hi and sorry for double posting - had mailer problems,

Terry said "queue". not "list". Use the Queue class (it's thread-safe)
in the "Queue" module (assuming you're using Python 2.x; in Python 3.x
it's called the "queue" module).

Yes yes, I know. I use a queue to realize the thread pool queue, that works all right.

But each worker thread calculates a result and needs to make it avaialable to the application in the main thread again. Therefore, it appends its result to a common list. This seems works as well, but I was thinking of possible conflict situations that maybe could happen when two threads append their results to that same result list at the same moment.

Regards,
Jens
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to