|
Re: Waiting on more then one event -- Accept_r: msg#00002web.fastcgi.devel
Artyom wrote: > Hello, > > There is a problem when I want to work with > multiple threads and receive other notifications > for example, timeout, cache notifications etc. > > The purposed solution on the lists is: > > pthread_mutex_lock > select(incoming fd,other event fd,timeout) > FCGX_Accept_r() > pthread_mutex_unlock > > Comments: > - I can't do select outside lock because > I may find two threads accepting same request > and one of them being blocked. The locks around select(2) are not necessary, since only one thread will be woken up by select. I'm not sure about poll, but it will work at least on Linux. Robert ___________________________________ fastcgi-developers mailing list http://fastcgi.com/fastcgi-developers/ |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Waiting on more then one event -- Accept_r: 00002, Artyom |
|---|---|
| Next by Date: | Re: Waiting on more then one event -- Accept_r: 00002, Artyom |
| Previous by Thread: | Waiting on more then one event -- Accept_ri: 00002, Artyom |
| Next by Thread: | Re: Waiting on more then one event -- Accept_r: 00002, Artyom |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |