Event driven server that wastes CPU when threaded doesn't
fredrik at pythonware.com
Mon Oct 30 08:20:17 CET 2006
Bjoern Schliessmann wrote:
>> If that is not an option, then you are faced with a problem of
>> connecting a threaded programming model with an event based model
>> (twisted and and such).
> I don't really see how threads could avoid a problem with delays in
> one connection ...
by running the database queries in one or more separate threads, you can
still serve requests that don't hit the database (either because they're
entirely self-contained, or because they only rely on cached data).
More information about the Python-list