> accept is safe to be called from multiple threads/processes at the same
> time, the OS guarantees that only one thread will get the accept, this
> is infact the recommended approach since you don't have one thread
> blocking the rest (this is how apache does it) However on older
> operating systems you have a problem called "Thundering Herd", where
> all threads are woken up and then put to sleep again except the one
> that gets it, to avoid that you can use a lock() to control access to
> the accept socket.
>
> so bind the socket, start the threads, accept in each separate thread
>
> Arthur

Hi Arthur,

Thanks, that sounds like good news. I will test it on win32. It is the
much simpler and elegant solution.

Regards

Nick


Reply via email to