Per telecon today, add a flag so we only warn once about reentrant libevent loops - this will allow developers to better diagnose the problem as we won't swamp filesystems with warning messages.
This commit was SVN r28712.
Этот коммит содержится в:
родитель
243f9ef586
Коммит
9166a8cc95
@ -1546,6 +1546,10 @@ event_loop(int flags)
|
|||||||
return event_base_loop(current_base, flags);
|
return event_base_loop(current_base, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/********* OMPI CHANGE **********/
|
||||||
|
static int warn_once = 0;
|
||||||
|
/*********/
|
||||||
|
|
||||||
int
|
int
|
||||||
event_base_loop(struct event_base *base, int flags)
|
event_base_loop(struct event_base *base, int flags)
|
||||||
{
|
{
|
||||||
@ -1558,9 +1562,12 @@ 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) {
|
if (base->running_loop && 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 **********/
|
||||||
|
warn_once = 1;
|
||||||
|
/*********/
|
||||||
EVBASE_RELEASE_LOCK(base, th_base_lock);
|
EVBASE_RELEASE_LOCK(base, th_base_lock);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user