/ext-fiber/tests/ |
H A D | fiber-get-current.phpt | 2 Fiber::getCurrent() 8 var_dump(Fiber::getCurrent()); 10 $fiber = new Fiber(function (): void { 11 var_dump(Fiber::getCurrent()); 19 object(Fiber)#%d (0) {
|
H A D | throw-in-multiple-destroyed-fibers-after-shutdown.phpt | 8 $fiber = new Fiber(function (): void { 9 $fiber1 = new Fiber(function (): void { 11 Fiber::suspend(); 19 $fiber2 = new Fiber(function (): void { 21 Fiber::suspend(); 29 Fiber::suspend(); 42 #0 %sthrow-in-multiple-destroyed-fibers-after-shutdown.php(%d): Fiber::suspend() 46 Next FiberExit: Fiber destroyed in %sthrow-in-multiple-destroyed-fibers-after-shutdown.php:%d 48 #0 %sthrow-in-multiple-destroyed-fibers-after-shutdown.php(%d): Fiber::suspend() 57 Next FiberExit: Fiber destroyed in %sthrow-in-multiple-destroyed-fibers-after-shutdown.php:%d [all …]
|
H A D | fiber-in-shutdown-function.phpt | 2 Fiber in shutdown function 9 $fiber = new Fiber(function (): int { 10 Fiber::suspend(1); 11 Fiber::suspend(2);
|
H A D | fiber-in-destruct.phpt | 8 $fiber = new Fiber(function (): int { 12 Fiber::suspend(2); 16 Fiber::suspend(1); 20 Fiber::suspend(3);
|
H A D | suspend-in-force-close-fiber.phpt | 8 $fiber = new Fiber(function (): void { 10 Fiber::suspend(); 12 Fiber::suspend(); 22 Fatal error: Uncaught FiberExit: Fiber destroyed in %ssuspend-in-force-close-fiber.php:%d 24 #0 %ssuspend-in-force-close-fiber.php(%d): Fiber::suspend() 30 #0 %ssuspend-in-force-close-fiber.php(%d): Fiber::suspend()
|
H A D | failing-nested-fiber.phpt | 8 $fiber = new Fiber(function (): void { 9 $fiber = new Fiber(function (int $x, int $y): void { 10 Fiber::suspend($x + $y); 28 #1 %sfailing-nested-fiber.php(%d): Fiber->resume(3) 30 #3 %sfailing-nested-fiber.php(%d): Fiber->start()
|
H A D | start-arguments.phpt | 8 $fiber = new Fiber(function (int $x): int { 9 return $x + Fiber::suspend($x); 16 $fiber = new Fiber(function (int $x): int { 17 return $x + Fiber::suspend($x); 29 #1 %sstart-arguments.php(%d): Fiber->start('test')
|
H A D | fatal-error-in-nested-fiber.phpt | 8 $fiber = new Fiber(function (): void { 9 $fiber = new Fiber(function (): void { 10 \Fiber::suspend(2); 16 \Fiber::suspend(1);
|
H A D | suspend-in-force-close-fiber-after-shutdown.phpt | 8 $fiber = new Fiber(function (): void { 10 Fiber::suspend(); 12 Fiber::suspend(); 24 Fatal error: Uncaught FiberExit: Fiber destroyed in %ssuspend-in-force-close-fiber-after-shutdown.p… 26 #0 %ssuspend-in-force-close-fiber-after-shutdown.php(%d): Fiber::suspend() 32 #0 %ssuspend-in-force-close-fiber-after-shutdown.php(%d): Fiber::suspend()
|
H A D | fiber-created-in-destruct.phpt | 2 Fiber created in destructor 11 $fiber = new Fiber(static function (): int { 12 Fiber::suspend(1);
|
H A D | fatal-error-with-multiple-fibers.phpt | 8 $fiber1 = new Fiber(function (): void { 10 \Fiber::suspend(1); 16 $fiber2 = new Fiber(function (): void { 17 \Fiber::suspend(2);
|
H A D | fiber-created-during-cleanup.phpt | 10 $fibers[$i] = new Fiber(function() { 12 Fiber::suspend(); 15 $fiber2 = new Fiber(function() { 18 Fiber::suspend();
|
H A D | get-return-from-unstarted-fiber.phpt | 2 Fiber::getReturn() from unstarted fiber 8 $fiber = new Fiber(fn() => Fiber::suspend(1)); 16 #0 %sget-return-from-unstarted-fiber.php(%d): Fiber->getReturn()
|
H A D | fiber-status.phpt | 2 Fiber status methods 8 $fiber = new Fiber(function (): void { 9 $fiber = Fiber::getCurrent(); 10 echo "\nWithin Fiber:\n"; 15 Fiber::suspend(); 48 Within Fiber:
|
H A D | get-return-in-unfinished-fiber.phpt | 2 Fiber::getReturn() in unfinished fiber 8 $fiber = new Fiber(fn() => Fiber::suspend(1)); 20 #0 %sget-return-in-unfinished-fiber.php(%d): Fiber->getReturn()
|
H A D | resume-running-fiber.phpt | 8 $fiber = new Fiber(function (): void { 9 $self = Fiber::getCurrent(); 19 #0 %sresume-running-fiber.php(%d): Fiber->resume() 21 #2 %sresume-running-fiber.php(%d): Fiber->start()
|
H A D | throw-during-fiber-destruct.phpt | 7 $fiber = new Fiber(function() { 9 Fiber::suspend(); 19 Fatal error: Uncaught FiberExit: Fiber destroyed in %s:%d 21 #0 %s(%d): Fiber::suspend()
|
H A D | fiber-throw-in-destruct.phpt | 2 Fiber throwing from destructor 11 $fiber = new Fiber(static function (): int { 12 Fiber::suspend(1); 28 #1 %sfiber-throw-in-destruct.php(%d): Fiber->resume()
|
H A D | catch-then-suspend.phpt | 8 $fiber = new Fiber(function () { 10 Fiber::suspend('in try'); 14 Fiber::suspend('after catch');
|
H A D | suspend-in-nested-function.phpt | 10 return Fiber::suspend(1); 13 $fiber = new Fiber(function (): int { 15 return Fiber::suspend($value);
|
/ext-fiber/ |
H A D | fiber_arginfo.h | 63 ZEND_METHOD(Fiber, __construct); 64 ZEND_METHOD(Fiber, start); 65 ZEND_METHOD(Fiber, resume); 66 ZEND_METHOD(Fiber, throw); 67 ZEND_METHOD(Fiber, isStarted); 68 ZEND_METHOD(Fiber, isSuspended); 69 ZEND_METHOD(Fiber, isRunning); 70 ZEND_METHOD(Fiber, isTerminated); 71 ZEND_METHOD(Fiber, getReturn); 72 ZEND_METHOD(Fiber, getCurrent); [all …]
|
H A D | fiber.stub.php | 6 final class Fiber class 26 public static function getCurrent(): ?Fiber {} 33 public function __construct(Fiber $fiber) {} 35 public function getFiber(): Fiber {}
|
H A D | README.md | 1 # Fiber Extension 3 Fiber implementation for PHP using native C fibers. 31 final class Fiber 113 * @param mixed $value Value to return from {@see Fiber::resume()} or {@see Fiber::throw()}. 124 …Fiber` object is created using `new Fiber(callable $callback)` with any callable. The callable nee… 130 * returning a value from `Fiber::suspend()` using `Fiber->resume()` 131 * throwing an exception from `Fiber::suspend()` using `Fiber->throw()` 147 * @param Fiber $fiber Any Fiber object, including those that are not started or have 153 * @return Fiber The reflected Fiber object. 155 public function getFiber(): Fiber {} [all …]
|
/ext-fiber/stubs/ |
H A D | ReflectionFiber.php | 6 * @param Fiber $fiber Any Fiber object, including those that are not started or have 9 public function __construct(Fiber $fiber) {} 12 * @return Fiber The reflected Fiber object. 14 public function getFiber(): Fiber {}
|
/ext-fiber/examples/ |
H A D | 001-simple.php | 3 $fiber = new Fiber(function (): void { 4 $value = Fiber::suspend('fiber');
|