Try to stop thread Using flag

Nils Oliver Kro"ger NO_Kroeger at gmx.de
Sat Nov 25 12:01:31 EST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The Python documentation states:

[quote]
start(  	)
    Start the thread's activity.

    This must be called at most once per thread object. It arranges for
the object's run() method to be invoked in a separate thread of control.
[/quote]

So you cannot start() one Thread object a second time, you have to
create a new one. But as you don't move any thread out of your list in
the OnEndProcess function all stopped Thread objects are indeed
restarted by your OnBeginProcess as they are still in self.threadlist.

Furthermore: you should wait in our OnEndProcess function and check
whether all thread have ended indeed by calling Thread.join().
Otherwise some threads mights still be running indeed.

Hope I could make it clear.

Greetings

Nils
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFFaHbrRQeuB6ws8wERAr4+AJ0UOTCPZoJLK8F4AfnfKyPInwQLVQCcC3a6
6aBP+POkMkKCym6JRaP87yw=
=AgnH
-----END PGP SIGNATURE-----



More information about the Python-list mailing list