From: Gonzalo A. <gon...@gm...> - 2006-09-08 18:59:31
|
Hi, I am about to attack the default session server now. I've noticed that it creates a thread for each connection. Could we use select/poll/epoll/libevent for using a single thread process? Some notes: 1) Creating multiple processes/threads all of them compeeting to obtain the same mutex is no better than processing one request at a time. 2) Using pthreads prevents core dumps in linux (I guess, I'm not sure), which are usefull for debugging. 3) Using threads is heavier than a single process, each thread requires a separate stack & processor state. 4) No shared memory is required, therefore it is easier to code (shared memory can be mapped in different virtual addresses in different processes, so vectors has to be used). How does this sound to you? Regards, -- Gonzalo A. Arana |