[no subject]

François Battail fb at francois.battail.name
Sun Apr 13 19:48:21 MSD 2008


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, that's my main problem and that's why I've
used the word "hacking" in the title of this subject.

> No.
> You need to protect the event queue not only from your threads, but also 
> from the main thread of the worker process, and here you don't have any 
> control.

I will modify Nginx to ensure it will use the same mutex as my threads when
accessing the event queue. In fact it's already in Nginx's code
(ngx_posted_event_mutex) but only active when compiling with the NGX_THREADS
directive. 

My project is a very specific module, so I will do any modification required in
Nginx's code.

Best regards






More information about the nginx mailing list