[Twisted-Python] daemon thread support

Martin Waite martin at datacash.com
Tue Dec 2 12:55:05 EST 2003


Hi,

I have written a simple network listener that
collects requests, stores these in a database,
pulls responses from a database, and forwards these
back over the network.

This uses three threads:
  * main twisted reactor thread
  * database writer thread
  * database reader thread

The database threads are created using reactor.callInThread().

Everything works fine, but I cannot get the application
to close down cleanly - it always blocks waiting for the 
database threads to stop.

Is there any way to mark these threads as daemon threads 
so that python will close down even if they're still running ?

regards,
Martin







More information about the Twisted-Python mailing list