Bernard Lebel wrote: > Example: > > - Class instance Bernard has attribute "name", whose value is "bernard". > - A function in a thread tests the value of "name". If "name" == > "bernard", do nothing. > - A function in another thread, for some reason, changes "name" to "bob". > - The first function, few moments later, tests again the value of > "name". It see that the value has changed from "bernard" to "bob", and > this change causes the function to take an action. > > Is that what you mean by "invoking" code?
No, it's not what I meant, I was talking about constructs that can cause an assignment like self.x = 1 to directly call code that you wrote. It sounds like you are not doing that. It sounds like you have some attributes that you are using as flags to allow one thread to control another. There are definitely some pitfalls here. You probably want to use threading.Condition or Queue.Queue to communicate between the threads. Can you give more details of what you are trying to do? Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor