Skip to content

Commit

Permalink
fix CI failures
Browse files Browse the repository at this point in the history
Signed-off-by: Demin Yin <deminy@deminy.net>
  • Loading branch information
deminy committed Mar 6, 2024
1 parent dacdca7 commit d392e2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/io/block-a-coroutine.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
// When function Swoole\Coroutine\run() is called, it automatically creates a main coroutine to run the code inside.
run(function () {
// The easiest way to block a coroutine is to use method \Swoole\Coroutine::sleep(). e.g.,
Swoole\Coroutine::sleep(0.001); // To block current coroutine for 1 millisecond.
Coroutine::sleep(0.001); // To block current coroutine for 1 millisecond.

// Here we show another approach (to block a coroutine) by using a channel.
$channel = new Channel(); // A channel of size 1 is created.
Expand Down
4 changes: 3 additions & 1 deletion examples/pool/database-pool/redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
use function Swoole\Coroutine\run;

run(function () {
$pool = new RedisPool((new RedisConfig())->withHost(System::gethostbyname('server')), 11);
/** @var string $host */
$host = System::gethostbyname('server');
$pool = new RedisPool((new RedisConfig())->withHost($host), 11);
for ($n = 1024; $n--;) {
go(function () use ($pool) {
$redis = $pool->get();
Expand Down

0 comments on commit d392e2b

Please sign in to comment.