Problem with threads and signals
Sebastian Meyer
s.meyer at technology-network.de
Wed Mar 17 09:43:44 EST 2004
On Wed, 17 Mar 2004 11:22:47 +0100, Holger Joukl wrote:
> Does the shutdown function get called when you issue the signal?
> How exactly do you handle the event communication in the treads´ shutdown
> methods?
> Please post the relevant code.
the shutdown function does not get called, it seems the signal gets lost
the threads shutdown function looks like:
--- CODE ---
# self._done is a threading.Event object
def shutdown(self):
self._done.set()
> Btw, I am new to python2.x (not new to python, though). This is not working
> code,
> is it?
> threads = {}
> threads["dircheck"] = TimedDirectoryCheck("/tmp/dpf/notify")
> threads["process"] = BatchProcessor()
> # start the threads
> for th in threads:
> th.start() # <---- Does that work???
>
of cource does this work, ... makes life a lot easier and saves up
variable names ... :-))
Sebastian
More information about the Python-list
mailing list