[Baypiggies] Threading question

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Thu Apr 27 00:25:02 CEST 2006

On Wed, 26 Apr 2006, Ari Krupnik wrote:

> I find myself writing these two lines all the time:
> t=myThread()
> t.start()
> Is there any reason to not call start() from the constructor?

It depends.  In the example above, things should work find if we go 
directly and say:


But do we want to be able to say t.wait() later on?  If so, we'll need to 
keep a name to the constructed thread, or else we won't have a way of 
sending additional messages to that thread.

Best of wishes!

More information about the Baypiggies mailing list