Re: SocketServer and timers

2006-08-08 Thread alf
[EMAIL PROTECTED] wrote: > alf wrote: > >>I have one thread app using SocketServer and use server_forever() as a >>main loop. All works fine, but now I need certain timer checking let's >>say every 1 second something and stopping the main loop. So questions are: >> -how to stop serve_forever

Re: SocketServer and timers

2006-07-28 Thread Simon Forman
[EMAIL PROTECTED] wrote: ... > > That alone does not work. If server.handle_request() blocks, > you don't get to the check(). You need some kind of timeout > in handle_request(). > > > -- > --Bryan Ach! You're right. I didn't consider that handle_request() might block.. -- http://mail.python.or

Re: SocketServer and timers

2006-07-28 Thread bryanjugglercryptographer
Simon Forman wrote: > alf wrote: > > Hi, > > > > I have one thread app using SocketServer and use server_forever() as a > > main loop. All works fine, but now I need certain timer checking let's > > say every 1 second something and stopping the main loop. So questions are: > > -how to stop ser

Re: SocketServer and timers

2006-07-28 Thread Simon Forman
alf wrote: > Hi, > > I have one thread app using SocketServer and use server_forever() as a > main loop. All works fine, but now I need certain timer checking let's > say every 1 second something and stopping the main loop. So questions are: > -how to stop serve_forever > -how to implem

Re: SocketServer and timers

2006-07-27 Thread bryanjugglercryptographer
alf wrote: > I have one thread app using SocketServer and use server_forever() as a > main loop. All works fine, but now I need certain timer checking let's > say every 1 second something and stopping the main loop. So questions are: > -how to stop serve_forever Override serve_forever() and

SocketServer and timers

2006-07-27 Thread alf
Hi, I have one thread app using SocketServer and use server_forever() as a main loop. All works fine, but now I need certain timer checking let's say every 1 second something and stopping the main loop. So questions are: -how to stop serve_forever -how to implement timers thx, a