Merge pull request #274 from sidyhe/bugfix

fiber: bugfix unexpect exit
This commit is contained in:
郑树新 2022-05-07 00:07:26 +08:00 committed by GitHub
commit 363d36972f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -215,6 +215,13 @@ static void fiber_io_loop(ACL_FIBER *self fiber_unused, void *ctx)
} else if (ring_size(&ev->events) > 0) {
continue;
}
// only sleep fiber alive ?
timer = FIRST_FIBER(&__thread_fiber->ev_timer);
if (timer) {
continue;
}
msg_info("%s(%d), tid=%lu: fdcount=0, waiter=%u, events=%d",
__FUNCTION__, __LINE__, __pthread_self(),
ev->waiter, ring_size(&ev->events));