Skip to content

Commit

Permalink
Merge branch 'walkor:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzqing authored Feb 5, 2025
2 parents d325b24 + 69d3c9d commit 9e625db
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 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 composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"require": {
"php": ">=8.1",
"ext-json": "*",
"workerman/coroutine": "^1.0 || dev-main"
"workerman/coroutine": "^1.1 || dev-main"
},
"suggest": {
"ext-event": "For better performance. "
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 9e625db

Please sign in to comment.