Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #77208 > unrolled thread
| Started by | Skip Montanaro <skip@pobox.com> |
|---|---|
| First post | 2014-08-28 08:51 -0500 |
| Last post | 2014-08-28 08:51 -0500 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Thread terminate Skip Montanaro <skip@pobox.com> - 2014-08-28 08:51 -0500
| From | Skip Montanaro <skip@pobox.com> |
|---|---|
| Date | 2014-08-28 08:51 -0500 |
| Subject | Re: Thread terminate |
| Message-ID | <mailman.13559.1409233872.18130.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
On Wed, Aug 27, 2014 at 1:55 PM, Ervin Hegedüs <airween@gmail.com> wrote: > what's the correct way to terminate a thread by itself? If this is something you need to do as a regular course of business, I'd share a Queue between the main thread and the target thread. When you want it to exit, shoot it a command to do so over the queue. If it's a worker thread of some sort, set it as a daemon thread. When your main thread exits and there are no other non-daemon threads alive, the program will exit. Skip
Back to top | Article view | comp.lang.python
csiph-web