[Python-Dev] threadsafe patch for asynchat (original) (raw)

"Martin v. Löwis" martin at v.loewis.de
Wed Feb 8 19:43:48 CET 2006


Steve Holden wrote:

In case the processing of events needed to block? If I'm processing web requests in an async* dispatch loop and a request needs the results of a (probably lengthy) database query in order to generate its output, how do I give the dispatcher control again to process the next asynchronous network event?

I see. Ideally, you should obtain the socket for the connection to the database, and add it to the asyncore loop. That would require you have an async database API, of course.

Regards, Martin



More information about the Python-Dev mailing list