1
1

Stay on the safe side: Only one thread is allowed

to handle an event_base.
Этот коммит содержится в:
George Bosilca 2014-12-15 23:19:51 -05:00
родитель 2fec570fe7
Коммит 357daa834e

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

@ -1566,14 +1566,16 @@ event_base_loop(struct event_base *base, int flags)
* as we invoke user callbacks. */ * as we invoke user callbacks. */
EVBASE_ACQUIRE_LOCK(base, th_base_lock); EVBASE_ACQUIRE_LOCK(base, th_base_lock);
if (base->running_loop && 0 == warn_once) { if (base->running_loop) {
if (0 == warn_once) {
event_warnx("%s: reentrant invocation. Only one event_base_loop" event_warnx("%s: reentrant invocation. Only one event_base_loop"
" can run on each event_base at once.", __func__); " can run on each event_base at once.", __func__);
/********* OMPI CHANGE **********/ /********* OMPI CHANGE **********/
warn_once = 1; warn_once = 1;
/*********/ /*********/
EVBASE_RELEASE_LOCK(base, th_base_lock); }
return -1; EVBASE_RELEASE_LOCK(base, th_base_lock);
return -1;
} }
base->running_loop = 1; base->running_loop = 1;