Anders J. Munch
andersjm at dancontrol.dk
Thu Mar 6 11:13:10 CET 2003
"Paul Moore" <gustav at morpheus.demon.co.uk> wrote:
> I can use a Queue to have the threads notify when they have finished,
> but that means rewriting the thread procedures to do the notification,
> which isn't really what I want.
Don't rewrite. Wrap.
def wrapped_threadprocedure(*args, **kwargs):
Now instead of
Write all the logic for collaboration with the main thread just once
in wrapped_threadprocedure, and you can keep the individual thread
procedures simple and framework agnostic.
More information about the Python-list