fix: all coroutines must be canceled before Event::exit #1059
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
在webman的协程基建插件( https://www.workerman.net/plugin/167 )的测试中发现,使用channel、waitGroup组件或者被hook的系统函数如sleep进行处理业务时,在退出workerman时会发生
[FATAL ERROR]: all coroutines (count: N) are asleep - deadlock!
(其中的N是退出时的协程数量)等错误;可能的错误还有:
webman协程基建插件后续对于swow、swoole事件的测试反馈会持续跟进提交到workerman。
另外,协程基建目前做的不仅针对于webman的协程化,还提供了workerman的worker/server的协程化。