Run the event loop once after adding a new signal event to the event library. Events are only processed at the start of an event loop (not at event add), so there was a window of time between event_add() and event_loop() for the signal event in which the event existed, but was not active. During this window, signals that should have triggered a callback could be lost.
Reviewed by Jeff and Tim. This commit was SVN r5715.
Этот коммит содержится в:
родитель
72f86297c8
Коммит
66a0c49e2b
@ -119,6 +119,12 @@ ompi_evsignal_add(sigset_t *evsigmask, struct ompi_event *ev)
|
||||
errx(1, "%s: OMPI_EV_SIGNAL incompatible use", __func__);
|
||||
evsignal = OMPI_EVENT_SIGNAL(ev);
|
||||
|
||||
#if OMPI_ENABLE_PROGRESS_THREADS
|
||||
if (!ompi_using_threads()) ompi_event_loop(OMPI_EVLOOP_NONBLOCK);
|
||||
#else
|
||||
ompi_event_loop(OMPI_EVLOOP_NONBLOCK);
|
||||
#endif
|
||||
|
||||
#ifndef WIN32
|
||||
sigaddset(evsigmask, evsignal);
|
||||
#endif
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user