Skip to content

Commit

Permalink
Change Workerman\Coroutine\Coroutine to Workerman\Coroutine
Browse files Browse the repository at this point in the history
  • Loading branch information
walkor committed Feb 5, 2025
1 parent 9f11e98 commit 520d10a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ Coroutine is used to create coroutines, enabling the execution of asynchronous t
```php
<?php
use Workerman\Connection\TcpConnection;
use Workerman\Coroutine\Coroutine;
use Workerman\Coroutine;
use Workerman\Events\Swoole;
use Workerman\Protocols\Http\Request;
use Workerman\Worker;
Expand All @@ -200,7 +200,7 @@ $worker->eventLoop = Swoole::class; // Or Swow::class or Fiber::class

$worker->onMessage = function (TcpConnection $connection, Request $request) {
Coroutine::create(function () {
echo file_get_contents("https://www.example.com/event/notify");
echo file_get_contents("http://www.example.com/event/notify");
});
$connection->send('ok');
};
Expand All @@ -217,7 +217,7 @@ Barrier is used to manage concurrency and synchronization in coroutines. It allo
<?php
use Workerman\Connection\TcpConnection;
use Workerman\Coroutine\Barrier;
use Workerman\Coroutine\Coroutine;
use Workerman\Coroutine;
use Workerman\Events\Swoole;
use Workerman\Protocols\Http\Request;
use Workerman\Worker;
Expand Down Expand Up @@ -295,7 +295,7 @@ Channel is a mechanism for communication between coroutines. One coroutine can p
<?php
use Workerman\Connection\TcpConnection;
use Workerman\Coroutine\Channel;
use Workerman\Coroutine\Coroutine;
use Workerman\Coroutine;
use Workerman\Events\Swoole;
use Workerman\Protocols\Http\Request;
use Workerman\Worker;
Expand Down Expand Up @@ -388,7 +388,7 @@ Worker::runAll();
<?php
use Workerman\Connection\TcpConnection;
use Workerman\Coroutine\Context;
use Workerman\Coroutine\Coroutine;
use Workerman\Coroutine;
use Workerman\Coroutine\Pool;
use Workerman\Events\Swoole;
use Workerman\Protocols\Http\Request;
Expand Down
2 changes: 1 addition & 1 deletion src/Worker.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
use Workerman\Connection\ConnectionInterface;
use Workerman\Connection\TcpConnection;
use Workerman\Connection\UdpConnection;
use Workerman\Coroutine\Coroutine;
use Workerman\Coroutine;
use Workerman\Events\Event;
use Workerman\Events\EventInterface;
use Workerman\Events\Fiber;
Expand Down

0 comments on commit 520d10a

Please sign in to comment.