On Tue, Mar 16, 2010 at 03:40:46PM +0100, Christophe Meessen
<[email protected]> wrote:
> With threads we can easily set up a pool of worker threads that easily
> and efficiently pick up the context associated to the connection
> becoming active. I don't see how an equivalent model can be efficiently
> implemented with processes.
Depends very much on the protocol and the OS abilities - pthread does work
over process boundaries (but maybe not on the platform where you need it),
as does accept() and read() on a shared fd. GNUL/Linux can selectively
share the fd table without sharing anything else (but you have no good API
for that, as it isn't supported by pthreads etc.).
> I would prefer it was possible to do it with processes because they have
> the benefit of a separate memory space which is much better for
> security and robustness. But I couldn't find a way to do it as easily
> and efficiently as with threads.
For your specific problem, that could well be true. Things aren't black or
white, there is grey stuff too :)
--
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