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

关于task和协程 #73

Closed
junshenshi opened this issue Jun 5, 2018 · 3 comments
Closed

关于task和协程 #73

junshenshi opened this issue Jun 5, 2018 · 3 comments
Labels

Comments

@junshenshi
Copy link

junshenshi commented Jun 5, 2018

Please answer these questions before submitting your issue. Thanks!

  1. Please provide your PHP and Swoole version. (php -v and php --ri swoole)
    php 7.2
    swoole2.1.3

  2. Please provide your Laravel/Lumen version.
    laravel5.5

  3. Which release version of this package are you using?
    2.2.1

如何实现TASK,协程异步IO?
看了src,只看到task push的方法,请问下以后会加入task自定义操作嘛?

@albertcht
Copy link
Member

albertcht commented Jun 5, 2018

Hi @junshenshi ,

Coroutine features are still under develop in branch feature/coroutine_feature. It will provide mysql, http coroutine clients and DB connection pool. This feature requires Swoole 4.0 and will be released after Swoole 4.0 stable version comes out.

Async task feature is not supported yet. It will be considered to be supported in the future. I suggest using coroutine clients for asyc I/O(after feature/coroutine_feature is released) and using laravel queue for other async task jobs.

@junshenshi
Copy link
Author

嗨!@albertcht
OK 刚刚查看了feature/coroutine_feature分支,建议可支持多种协程,
另外希望会有个example目录展示所有功能,以便参考使用。

@albertcht
Copy link
Member

albertcht commented Jun 5, 2018

Hi @junshenshi ,

In the coroutine feature, users will be able to use all the coroutine clients naturally based on Swoole 4.0. I just provide a more advanced integration with Eloquent for more elegant usage with MySQL client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants