@@ -188,7 +188,7 @@ Coroutine is used to create coroutines, enabling the execution of asynchronous t
188
188
``` php
189
189
<?php
190
190
use Workerman\Connection\TcpConnection;
191
- use Workerman\Coroutine\Coroutine ;
191
+ use Workerman\Coroutine;
192
192
use Workerman\Events\Swoole;
193
193
use Workerman\Protocols\Http\Request;
194
194
use Workerman\Worker;
@@ -200,7 +200,7 @@ $worker->eventLoop = Swoole::class; // Or Swow::class or Fiber::class
200
200
201
201
$worker->onMessage = function (TcpConnection $connection, Request $request) {
202
202
Coroutine::create(function () {
203
- echo file_get_contents("https ://www.example.com/event/notify");
203
+ echo file_get_contents("http ://www.example.com/event/notify");
204
204
});
205
205
$connection->send('ok');
206
206
};
@@ -217,7 +217,7 @@ Barrier is used to manage concurrency and synchronization in coroutines. It allo
217
217
<?php
218
218
use Workerman\Connection\TcpConnection;
219
219
use Workerman\Coroutine\Barrier;
220
- use Workerman\Coroutine\Coroutine ;
220
+ use Workerman\Coroutine;
221
221
use Workerman\Events\Swoole;
222
222
use Workerman\Protocols\Http\Request;
223
223
use Workerman\Worker;
@@ -295,7 +295,7 @@ Channel is a mechanism for communication between coroutines. One coroutine can p
295
295
<?php
296
296
use Workerman\Connection\TcpConnection;
297
297
use Workerman\Coroutine\Channel;
298
- use Workerman\Coroutine\Coroutine ;
298
+ use Workerman\Coroutine;
299
299
use Workerman\Events\Swoole;
300
300
use Workerman\Protocols\Http\Request;
301
301
use Workerman\Worker;
@@ -388,7 +388,7 @@ Worker::runAll();
388
388
<?php
389
389
use Workerman\Connection\TcpConnection;
390
390
use Workerman\Coroutine\Context;
391
- use Workerman\Coroutine\Coroutine ;
391
+ use Workerman\Coroutine;
392
392
use Workerman\Coroutine\Pool;
393
393
use Workerman\Events\Swoole;
394
394
use Workerman\Protocols\Http\Request;
0 commit comments