mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
event_base_update_cache_time should be a no-op if the loop isn't running
This commit is contained in:
parent
1c3147f5e7
commit
5e6fa2a3ab
3
event.c
3
event.c
@ -426,7 +426,8 @@ event_base_update_cache_time(struct event_base *base)
|
|||||||
}
|
}
|
||||||
|
|
||||||
EVBASE_ACQUIRE_LOCK(base, th_base_lock);
|
EVBASE_ACQUIRE_LOCK(base, th_base_lock);
|
||||||
update_time_cache(base);
|
if (base->running_loop)
|
||||||
|
update_time_cache(base);
|
||||||
EVBASE_RELEASE_LOCK(base, th_base_lock);
|
EVBASE_RELEASE_LOCK(base, th_base_lock);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user