[no subject]

Manlio Perillo manlio_perillo at libero.it
Mon Apr 14 18:27:11 MSD 2008

François Battail ha scritto:
> Manlio Perillo <manlio_perillo at ...> writes:
>> Two questions:
>> - how many threads do you have for each worker process?
>> - how do you plan to implement the "wake up"?
> I believe that 4 threads by worker should be sufficient but I need to do some
> benchmarks. For the second question, the wake up will be done by injecting a
> "fake" Nginx event into the queue, 

Note that this it not sufficient to "wake up" the main thread.
In fact, the main event loop can be waiting on the select/poll/epoll/kqueue.

A solution is to use a pipe: the read end is registered in the event 
loop, and the write end is used by threads to wake the main event loop.

Manlio Perillo

More information about the nginx mailing list