老师您好 我这边在处理协程 mysql时出现报错 (上部分报错 下部分 代码 )是需要修改什么配置吗
来源:5-5 异步Mysql详解(上)

1652833140
2019-08-06
[root@swoole io]# php sql.php
PHP Fatal error: Uncaught Swoole\Error: operation not support (reactor is not ready) in /root/study/work/demo/io/sql.php:4
Stack trace:
#0 /root/study/work/demo/io/sql.php(4): Swoole\Coroutine\MySQL->connect(Array)
#1 {main}
thrown in /root/study/work/demo/io/sql.php on line 4
Fatal error: Uncaught Swoole\Error: operation not support (reactor is not ready) in /root/study/work/demo/io/sql.php:4
Stack trace:
#0 /root/study/work/demo/io/sql.php(4): Swoole\Coroutine\MySQL->connect(Array)
#1 {main}
thrown in /root/study/work/demo/io/sql.php on line 4
[root@swoole io]# cat sql.php
1回答
-
您好。用这个试试 Swoole\Coroutine::create()
042019-08-07
相似问题
回答 5
回答 1
回答 2
回答 2
回答 2