If you make your worker threads daemon threads, they will die when all your non-daemon threads (e.g. the main thread) have exited.
http://docs.python.org/library/threading.html#threading.Thread.daemon
More Related Contents:
- How can I use threading in Python?
- Timeout on a function call
- threading.Timer – repeat function every ‘n’ seconds
- Are lists thread-safe?
- Freezing/Hanging tkinter GUI in waiting for the thread to complete
- Daemon Threads Explanation
- What is the use of join() in Python threading?
- thread starts running before calling Thread.start
- A very simple multithreading parallel URL fetching (without queue)
- The right way to limit maximum number of threads running at once?
- Thread vs. Threading
- Python – appending to same file from multiple threads
- How to pause and resume a thread using the threading module?
- Meaning of daemon property on Python Threads
- How to use threading in Python?
- What is the use of join() in threading?
- Return value from thread
- How to start threads at the same time in Python [duplicate]
- Restarting a thread in Python
- How to obtain a Thread id in Python?
- How do I use threading in Python?
- With “args” vs without “args” to pass arguments to a thread in Python
- How to run functions in parallel?
- Is there any way to kill a Thread?
- Overriding python threading.Thread.run()
- Python Threading String Arguments
- Terminate multiple threads when any thread completes a task
- How do I create a file in python without overwriting an existing file
- How to implement a Lock with a timeout in Python 2.7
- Trigger an event when clipboard content changes