PEP 249 - DB API question

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Tue Nov 4 23:46:20 EST 2008


In message <mailman.3470.1225823782.3487.python-list at python.org>, James
Mills wrote:

> Try spawning a new process to run your query in.

One approach might be to have two processes: the worker process and the
watcher process. The worker does the work, of course. Before performing any
call that may hang, the worker sends a message to the watcher: "if you
don't hear back from me in x seconds, kill me". It then does the call.
After the call, it sends another message to the watcher: "OK, I'm back,
cancel the timeout".



More information about the Python-list mailing list