Voting

: max(eight, eight)?
(Example: nine)

The Note You're Voting On

dvohra09 at yahoo dot com
1 year ago
Fiber::isRunning does not return a value
Sample
-------

<?php


$fiber
= new Fiber(function (): void {
$value = Fiber::suspend('suspend');

echo
"Fiber is resumed with value: ", $value, "\n";

});

echo
"Fiber not yet started.", "\n";

$value = $fiber->start();

echo
"Fiber is started: ", $fiber->isStarted(), "\n";
echo
"Fiber is suspended: ", $fiber->isSuspended(), "\n";

echo
"Fiber is running: ", $fiber->isRunning(), "\n";

echo
"Fiber is suspended with value: ", $value, "\n";
$fiber->resume('resume');

echo
"Fiber is running: ", $fiber->isRunning(), "\n";

?>
Output
---

Fiber not yet started. Fiber is started: 1 Fiber is suspended: 1 Fiber is running: Fiber is suspended with value: suspend Fiber is resumed with value: resume Fiber is running:

<< Back to user notes page

To Top