unsigned long th_owner_id;
/** A lock to prevent conflicting accesses to this event_base */
void *th_base_lock;
- /** The event whose callback is executing right now */
- struct event *current_event;
/** A condition that gets signalled when we're done processing an
* event with waiters on it. */
void *current_event_cond;
/** Number of threads blocking on current_event_cond. */
int current_event_waiters;
#endif
+ /** The event whose callback is executing right now */
+ struct event *current_event;
#ifdef _WIN32
/** IOCP support structure, if IOCP is enabled. */
ev->ev_res & EV_WRITE ? "EV_WRITE " : " ",
ev->ev_callback));
-#ifndef EVENT__DISABLE_THREAD_SUPPORT
base->current_event = ev;
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
base->current_event_waiters = 0;
#endif
}
EVBASE_ACQUIRE_LOCK(base, th_base_lock);
-#ifndef EVENT__DISABLE_THREAD_SUPPORT
base->current_event = NULL;
+#ifndef EVENT__DISABLE_THREAD_SUPPORT
if (base->current_event_waiters) {
base->current_event_waiters = 0;
EVTHREAD_COND_BROADCAST(base->current_event_cond);