Re: Forking SocketServer daemon -- updating state

2007-02-20 Thread Nick Craig-Wood
Reid Priedhorsky [EMAIL PROTECTED] wrote: I am implementing a forking SocketServer daemon that maintains significant internal state (a graph that takes ~30s to build by fetching from a SQL database, and eventually further state that may take up to an hour to build). I would like to be

Forking SocketServer daemon -- updating state

2007-02-19 Thread Reid Priedhorsky
Hi folks, I am implementing a forking SocketServer daemon that maintains significant internal state (a graph that takes ~30s to build by fetching from a SQL database, and eventually further state that may take up to an hour to build). I would like to be able to notify the daemon that it needs to

Re: Forking SocketServer daemon -- updating state

2007-02-19 Thread Irmen de Jong
Reid Priedhorsky wrote: Another possibility is that the signal handler simply sets a needs_update flag, which I could check for in a handle_request() loop. The disadvantage here is that the update wouldn't happen until after the next request is handled, and I would like the state to be