Are hooks really disabled by default? #5601
Answered
by
leocavalcante
CViniciusSDias
asked this question in
Q&A
-
Hey there, folks. Swoole's documentation states that the This code outputs "Hello, world!", i.e., <?php
use function Swoole\Coroutine\{run, go};
run(function () {
go(function () {
sleep(2);
echo 'world!' . PHP_EOL;
});
go(function () {
sleep(1);
echo 'Hello, ';
});
}); If on the top of the file I add PS.: swoole_version() = 5.1.6 |
Beta Was this translation helpful? Give feedback.
Answered by
leocavalcante
Dec 4, 2024
Replies: 1 comment 1 reply
-
The |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
CViniciusSDias
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
run
function starts a scheduler that enables them: https://github.com/swoole/library/blob/master/src/core/Coroutine/functions.php#L21