} else {
TPL_ERR("eventfd(%d) cannot wake up with other condition. cond(%d)",
del_source->event_fd, cond);
- g_cond_signal(&_twe_ctx->thread_cond);
- g_mutex_unlock(&_twe_ctx->thread_mutex);
- TPL_ASSERT((cond & G_IO_IN));
+
+ g_source_remove_unix_fd(del_source->event_fd, del_source->tag);
+ close(del_source->event_fd);
+ del_source->tag = NULL;
+ del_source->event_fd = -1;
}
g_cond_signal(&_twe_ctx->thread_cond);
} else {
TPL_ERR("eventfd(%d) cannot wake up with other condition. cond(%d)",
surf_source->event_fd, cond);
- TPL_ASSERT((cond & G_IO_IN));
+ g_source_remove_unix_fd(source, surf_source->tag);
+ close(surf_source->event_fd);
+ surf_source->tag = NULL;
+ surf_source->event_fd = -1;
}
g_mutex_unlock(&surf_source->surf_mutex);