Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #68794 > unrolled thread
| Started by | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| First post | 2014-03-22 16:48 -0400 |
| Last post | 2014-03-22 16:48 -0400 |
| 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: terminate a program gracefully from a thread Terry Reedy <tjreedy@udel.edu> - 2014-03-22 16:48 -0400
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Date | 2014-03-22 16:48 -0400 |
| Subject | Re: terminate a program gracefully from a thread |
| Message-ID | <mailman.8408.1395521304.18130.python-list@python.org> |
On 3/22/2014 8:40 AM, Jabba Laci wrote: > I have a script (see below) that I want to terminate after X seconds. > The main loop of the program is waiting for user input. > The program enters the main loop and I try to shut down the program > after X seconds from a thread but I can't figure out how to do it. The > program should also do some cleanup before termination, so the shut > down must be graceful. Although you have gotten comments specific to your problem, this type of thing should be easy (in just one thread) with asyncio (new in 3.4, backport on PyPI). -- Terry Jan Reedy
Back to top | Article view | comp.lang.python
csiph-web