fixed deadlock
This commit was SVN r1022.
Этот коммит содержится в:
родитель
20469b4248
Коммит
94a93ab1e1
@ -221,15 +221,15 @@ epoll_dispatch(void *arg, struct timeval *tv)
|
||||
continue;
|
||||
|
||||
if (evread != NULL && !(evread->ev_events & LAM_EV_PERSIST))
|
||||
lam_event_del(evread);
|
||||
lam_event_del_i(evread);
|
||||
if (evwrite != NULL && evwrite != evread &&
|
||||
!(evwrite->ev_events & LAM_EV_PERSIST))
|
||||
lam_event_del(evwrite);
|
||||
lam_event_del_i(evwrite);
|
||||
|
||||
if (evread != NULL)
|
||||
lam_event_active(evread, LAM_EV_READ, 1);
|
||||
lam_event_active_i(evread, LAM_EV_READ, 1);
|
||||
if (evwrite != NULL)
|
||||
lam_event_active(evwrite, LAM_EV_WRITE, 1);
|
||||
lam_event_active_i(evwrite, LAM_EV_WRITE, 1);
|
||||
}
|
||||
|
||||
return (0);
|
||||
|
@ -120,10 +120,10 @@ poll_dispatch(void *arg, struct timeval *tv)
|
||||
nfds = 0;
|
||||
TAILQ_FOREACH(ev, &lam_eventqueue, ev_next) {
|
||||
if (nfds + 1 >= count) {
|
||||
if (count < 32)
|
||||
count = 32;
|
||||
if (count < 256)
|
||||
count = 256;
|
||||
else
|
||||
count *= 2;
|
||||
count <<= 1;
|
||||
|
||||
/* We need more file descriptors */
|
||||
pop->event_set = realloc(pop->event_set,
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user