On Mon, Mar 15, 2010 at 08:48:20PM +0500, mikhail maluyk 
<[email protected]> wrote:
> How do you know beforehand that processing data will take some time?

It depends on the problem domain - in many cases you do know whether a
task will take some time, for example, when it runs a database query or
does disk I/O.

Often you can delay the decision on whether to pass or not until you know,
too.

If you truly don't know, then running multiple processes is best, followed by
multiple threads running their own event loop, followed by sharing. Well,
*usually*.

-- 
                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

Reply via email to