mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-11-30 19:07:35 +08:00
fiber: bugfix unexpect exit
无IO协程时调度器异常退出 (win/linux) 复现步骤: 创建一个协程, 进行几个IO操作, 然后死循环 acl_fiber_delay(1000)
This commit is contained in:
parent
39b11013d2
commit
4801b5c8ee
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user