Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement RFC-1011 #1732

Merged
merged 17 commits into from Jun 20, 2018
Merged

Implement RFC-1011 #1732

merged 17 commits into from Jun 20, 2018

Conversation

twose
Copy link
Member

@twose twose commented Jun 20, 2018

RFC1011: swoole/rfc#24

改动

  • 去除--enable_coroutine编译参数, SW_COROUTINE默认开启
  • 在server->set和swoole_async_set增加enable_coroutine选项
  • 增加两个使用例子
  • 增加两个单元测试

enable_coroutine 选项相当于在回调中关闭以前版本的SW_COROUTINE宏开关, 关闭时在回调事件中不再创建协程,但是保留用户创建协程的能力。


enable_coroutine影响范围

所有原有自动创建协程的回调, 包括

  • onWorkerStart
  • onConnect
  • onOpen
  • onReceive
  • redis_onReceive
  • onHandShake
  • onPacket
  • onRequest
  • onMessage
  • onPipeMessage
  • onClose
  • tick/after 定时器

@matyhtf matyhtf merged commit 63fd696 into swoole:master Jun 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants