Re: Making a timebomb

2005-08-08 Thread Cantankerous Old Git
Peter Hansen wrote: > Cantankerous Old Git wrote: > >> Peter Hansen wrote: >> >>> Cantankerous Old Git wrote: >>> The dirty way, which can leave corrupt half-written files and other nasties, is something like sys.exit(). >>> >>> >>> sys.exit() won't help you if your server is running in

Re: Making a timebomb

2005-08-07 Thread Peter Hansen
Cantankerous Old Git wrote: > Peter Hansen wrote: >> Cantankerous Old Git wrote: >>> The dirty way, which can leave corrupt half-written files and other >>> nasties, is something like sys.exit(). >> >> sys.exit() won't help you if your server is running in the main >> thread, nor if your server t

Re: Making a timebomb

2005-08-07 Thread Cantankerous Old Git
Peter Hansen wrote: > Cantankerous Old Git wrote: > >> [EMAIL PROTECTED] wrote: >> >>> I have a server that right now runs infinitely. I'd like to make it >>> die after some amount of time. >> >> >> The proper way to do it is to have the timer set a flag that the other >> threads check regular

Re: Making a timebomb

2005-08-05 Thread Peter Hansen
Cantankerous Old Git wrote: > [EMAIL PROTECTED] wrote: > >> I have a server that right now runs infinitely. I'd like to make it >> die after some amount of time. > > The proper way to do it is to have the timer set a flag that the other > threads check regularly. The threads can then clean up

Re: Making a timebomb

2005-08-05 Thread Cantankerous Old Git
[EMAIL PROTECTED] wrote: > I have a server that right now runs infinitely. I'd like to make it > die after some amount of time. I was thinking of having a timebomb > thread that starts when the server starts. The timebomb sits, and > sleeps for the specified timeout period (e.g., 5 hours), then

Re: Making a timebomb

2005-08-05 Thread Benjamin Niemann
[EMAIL PROTECTED] wrote: > I have a server that right now runs infinitely. I'd like to make it > die after some amount of time. I was thinking of having a timebomb > thread that starts when the server starts. The timebomb sits, and > sleeps for the specified timeout period (e.g., 5 hours), then

Re: Making a timebomb

2005-08-05 Thread Peter Hansen
[EMAIL PROTECTED] wrote: > I have a server that right now runs infinitely. I'd like to make it > die after some amount of time. I was thinking of having a timebomb > thread that starts when the server starts. The timebomb sits, and > sleeps for the specified timeout period (e.g., 5 hours), then

Making a timebomb

2005-08-05 Thread callmebill
I have a server that right now runs infinitely. I'd like to make it die after some amount of time. I was thinking of having a timebomb thread that starts when the server starts. The timebomb sits, and sleeps for the specified timeout period (e.g., 5 hours), then does something to make the main t