weblib.watch¶
-
class
weblib.watch.Watcher[source]¶ this class solves two problems with multithreaded programs in Python, (1) a signal might be delivered to any thread (which is just a malfeature) and (2) if the thread that gets the signal is waiting, the signal is ignored (which is a bug).
The watcher is a concurrent process (not thread) that waits for a signal and the process that contains the threads. See Appendix A of The Little Book of Semaphores. http://greenteapress.com/semaphores/
I have only tested this on Linux. I would expect it to work on the Macintosh and not work on Windows.