Re: terminate a program gracefully from a thread

2014-03-22 Thread Terry Reedy
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

Re: terminate a program gracefully from a thread

2014-03-22 Thread Chris Angelico
On Sun, Mar 23, 2014 at 12:18 AM, Dave Angel wrote: > Alternatively, rethink the need to preload at boot time. Any > caching the OS does is likely to only last a few minutes, > depending on load. So maybe you can make the real load seem to be > quicker by displaying the gui right away, but d

Re: terminate a program gracefully from a thread

2014-03-22 Thread Jabba Laci
> You need a flag to indicate that a particular invocation is the > dummy one (background). So use that same flag either to suppress > starting the thread, or to avoid the unwanted raw_input. > > Alternatively, rethink the need to preload at boot time. Any > caching the OS does is likely to o

terminate a program gracefully from a thread

2014-03-22 Thread Jabba Laci
Hi, 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 c