rene-aguirre/pywinusb — pull request #16 by jrowberg (2014-11-29 18:00:08+00:00)
Title: Change input report processing/reader threads to daemons

While developing a Python app which uses PyWinUSB, I am frequently running into cases while debugging (my code) where the main thread exits due to an exception, but a HID device is already open and there is a thread running in the background which prevents the process from terminating. There is a simple change for threads which causes them to automatically close when the main thread closes, and that is to set the `.daemon` member variable to `True` prior to calling `start()` on the thread. I tried applying this modification in the two relevant places in `core.py`, and it seems to have solved the problem nicely.

If there is any reason why you intentionally did *not* do this, please feel free to reject the request...but otherwise it might be a helpful addition.