How could I ask Thread B to call B().Method() from inside Thread A's run?

NavyJay gaudetteje at gmail.com
Wed Nov 30 12:30:23 EST 2005


I agree with jmj's solution, you would want to send a signal of some
sort to Thread B from A when some event occurs in A.  A queue is one
way to do it, but keep in mind that there are numerous ways to
communicate between threads/processes (queue, pipe, exit status,
TCP/UDP message, etc.).  I believe one of the first couple chapters in
O'Reilly's "Programming Python" book discusses most of these methods.
Choose the simplest one that meets your needs.




More information about the Python-list mailing list