threads only called once?

James J. Besemer jb at
Wed Aug 7 15:26:06 CEST 2002

Peter Hansen wrote:

> Why do something like that?  You can just repeatedly create
> instances of the "test" class (might be better renamed Test,
> by the way, according to the usual convention) and .start()
> them...  anyway, what's wrong with having to create a new
> thread object each time?

Even easier, cut loose all the framework gunk and just start your
thread manually:

    import thread

    def Reader(): ...
    def Writer(): ...

    thread.start_new_thread( Reader, ())
    thread.start_new_thread( Writer, ())



James J. Besemer  503-280-0838 voice  503-280-0375 fax
mailto:jb at

More information about the Python-list mailing list