1
1

* Fix for bug 1019. Really bad idea to call ompi_event_loop() from a thread

that isn't the progress thread when running a threaded build.

This commit was SVN r3097.
Этот коммит содержится в:
Brian Barrett 2004-10-13 23:08:47 +00:00
родитель c491597945
Коммит 4289d0608f

Просмотреть файл

@ -215,7 +215,13 @@ ompi_rte_waitpid(pid_t wpid, int *status, int options)
ompi_condition_timedwait(data->cond,
cond_mutex,
&spintime);
#if OMPI_HAVE_THREADS
if (ompi_event_progress_thread()) {
ompi_event_loop(OMPI_EVLOOP_NONBLOCK);
}
#else
ompi_event_loop(OMPI_EVLOOP_NONBLOCK);
#endif
}
ompi_mutex_unlock(cond_mutex);
@ -426,9 +432,14 @@ register_sig_event(void)
ompi_event_add(&handler, NULL);
/* it seems that the event is only added to the queue at the next
progress call. So push the event library (might as well push
the pml/ptl at the same time) */
progress call. So push the event library */
#if OMPI_HAVE_THREADS
if (ompi_event_progress_thread()) {
ompi_event_loop(OMPI_EVLOOP_NONBLOCK);
}
#else
ompi_event_loop(OMPI_EVLOOP_NONBLOCK);
#endif
cleanup:
OMPI_THREAD_UNLOCK(&ev_reg_mutex);