Terminate a thread that doesn't check for events
lshuai at kaneva.com
Mon Aug 1 22:29:22 CEST 2005
I am aware that similar and probably same questions have been posted
many times, but I was unable to find a solution after reading a dozen
threads in the archive. So here it goes again.
I have a thread that does some heavy task (hash calculation, for
instance). I need a mechanism that works *across platforms* to stop that
calculation if user decides to exit. How can I do that?
I can not do the standard "periodical checking" way since there is only
one function/step call in my thread.
Here is a snippet of my thread classes to help illustrate the problem:
self.__worker = Worker()
#how do i stop the worker?
Thank you in advance for any suggestions/pointers.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list