On Thu, Mar 11, 2010 at 10:22:48PM +0100, "[email protected]" <[email protected]>
wrote:
> Accept, read, process, write -- all the stuff you do when you get an HTTP
> request.
well, *during* accept, read, process etc. obviously you cannot accept other
requests (for that, it would have to be asynchronous :).
you have to return to the event loop (or run the event loop) for events to be
seen and acted upon.
that's what other people mean when they said that you should keep
your processing time reasonably short (or separate it into multiple
"chunks" that get called by e.g. an idle watcher) - as long as you
calculate something, your program can't do anything else. accept/read on
non-blocking file descriptions etc. are usually very quick, so most likely
your program hangs on other things, such as reading from a file (which is
not that quick as often heavy physical things have to move :), or while
calculating something.
--
The choice of a Deliantra, the free code+content MORPG
-----==- _GNU_ http://www.deliantra.net
----==-- _ generation
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / [email protected]
-=====/_/_//_/\_,_/ /_/\_\
_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev