/ext-fiber/src/ |
H A D | php_fiber.c | 50 PHP_MINIT_FUNCTION(fiber) in PHP_MINIT_FUNCTION() argument 60 PHP_MSHUTDOWN_FUNCTION(fiber) in PHP_MSHUTDOWN_FUNCTION() argument 104 PHP_MINIT(fiber), 105 PHP_MSHUTDOWN(fiber), 106 PHP_RINIT(fiber), 107 PHP_RSHUTDOWN(fiber), 108 PHP_MINFO(fiber), 110 PHP_MODULE_GLOBALS(fiber), 111 PHP_GINIT(fiber), 112 PHP_GSHUTDOWN(fiber), [all …]
|
H A D | fiber.c | 156 ZEND_ASSERT(fiber); in zend_fiber_execute() 173 fiber->stack_bottom = fiber->execute_data; in zend_fiber_execute() 184 fiber->fci.retval = &fiber->value; in zend_fiber_execute() 188 zend_call_function(&fiber->fci, &fiber->fci_cache); in zend_fiber_execute() 324 Z_PARAM_FUNC(fiber->fci, fiber->fci_cache) in ZEND_METHOD() 336 Z_PARAM_VARIADIC_WITH_NAMED(fiber->fci.params, fiber->fci.param_count, fiber->fci.named_params); in ZEND_METHOD() 421 zend_fiber *fiber; in ZEND_METHOD() local 457 zend_fiber *fiber; in ZEND_METHOD() local 565 if (!fiber) { in ZEND_METHOD() 621 …if (fiber == NULL || fiber->status == ZEND_FIBER_STATUS_INIT || fiber->status & ZEND_FIBER_STATUS_… [all …]
|
/ext-fiber/tests/ |
H A D | fiber-status.phpt | 4 fiber 9 $fiber = Fiber::getCurrent(); 11 var_dump($fiber->isStarted()); 19 var_dump($fiber->isStarted()); 20 var_dump($fiber->isRunning()); 24 $fiber->start(); 27 var_dump($fiber->isStarted()); 28 var_dump($fiber->isRunning()); 32 $fiber->resume(); 35 var_dump($fiber->isStarted()); [all …]
|
H A D | gc-cycle-result.phpt | 2 GC can cleanup cycle when fiber result references fiber 4 fiber 8 $fiber = null; 9 $fiber = new Fiber(function () use (&$fiber) { 10 return new class($fiber) { 11 private $fiber; 13 public function __construct($fiber) { 14 $this->fiber = $fiber; 23 $fiber->start(); 29 var_dump($fiber->isTerminated()); [all …]
|
H A D | fatal-error-in-nested-fiber.phpt | 2 Fatal error within a nested fiber 4 fiber 8 $fiber = new Fiber(function (): void { 9 $fiber = new Fiber(function (): void { 11 trigger_error("Fatal error in nested fiber", E_USER_ERROR); 14 var_dump($fiber->start()); 18 $fiber->resume(); 21 var_dump($fiber->start()); 23 $fiber->resume(); 30 Fatal error: Fatal error in nested fiber in %sfatal-error-in-nested-fiber.php on line %d
|
H A D | resume-terminated-fiber.phpt | 2 Resume terminated fiber 4 fiber 8 $fiber = new Fiber(fn() => null); 10 $fiber->start(); 12 $fiber->resume(); 16 …tal error: Uncaught FiberError: Cannot resume a fiber that is not suspended in %sresume-terminated… 18 #0 %sresume-terminated-fiber.php(%d): Fiber->resume() 20 thrown in %sresume-terminated-fiber.php on line %d
|
H A D | get-return-in-unfinished-fiber.phpt | 2 Fiber::getReturn() in unfinished fiber 4 fiber 8 $fiber = new Fiber(fn() => Fiber::suspend(1)); 10 var_dump($fiber->start()); 12 $fiber->getReturn(); 18 …r: Uncaught FiberError: Cannot get fiber return value: The fiber has not returned in %sget-return-… 20 #0 %sget-return-in-unfinished-fiber.php(%d): Fiber->getReturn() 22 thrown in %sget-return-in-unfinished-fiber.php on line %d
|
H A D | fast-finish-fiber.phpt | 2 Fast finishing fiber does not leak 4 fiber 8 $fiber = new Fiber(fn() => 'test'); 9 var_dump($fiber->isStarted()); 10 var_dump($fiber->start()); 11 var_dump($fiber->getReturn()); 12 var_dump($fiber->isTerminated());
|
H A D | failing-nested-fiber.phpt | 2 Test throwing from fiber 4 fiber 8 $fiber = new Fiber(function (): void { 9 $fiber = new Fiber(function (int $x, int $y): void { 14 $value = $fiber->start(1, 2); 16 $fiber->resume($value); 19 $fiber->start(); 25 Fatal error: Uncaught Exception: test in %sfailing-nested-fiber.php:6 28 #1 %sfailing-nested-fiber.php(%d): Fiber->resume(3) 30 #3 %sfailing-nested-fiber.php(%d): Fiber->start() [all …]
|
H A D | fiber-in-destruct.phpt | 2 Pause fiber in destruct 4 fiber 8 $fiber = new Fiber(function (): int { 25 var_dump($fiber->start()); 26 var_dump($fiber->resume()); 27 var_dump($fiber->resume()); 28 var_dump($fiber->resume()); 29 var_dump($fiber->getReturn());
|
H A D | fatal-error-in-fiber.phpt | 2 Fatal error in new fiber 4 fiber 8 $fiber = new Fiber(function (): void { 9 trigger_error("Fatal error in fiber", E_USER_ERROR); 12 $fiber->start(); 16 Fatal error: Fatal error in fiber in %sfatal-error-in-fiber.php on line %d
|
H A D | get-return-from-unstarted-fiber.phpt | 2 Fiber::getReturn() from unstarted fiber 4 fiber 8 $fiber = new Fiber(fn() => Fiber::suspend(1)); 10 $fiber->getReturn(); 14 … Uncaught FiberError: Cannot get fiber return value: The fiber has not been started in %sget-retur… 16 #0 %sget-return-from-unstarted-fiber.php(%d): Fiber->getReturn() 18 thrown in %sget-return-from-unstarted-fiber.php on line %d
|
H A D | unfinished-fiber-with-finally.phpt | 2 Test unfinished fiber with finally block 4 fiber 8 $fiber = new Fiber(function (): void { 10 echo "fiber\n"; 19 echo "end of fiber should not be reached\n"; 22 $fiber->start(); 24 unset($fiber); // Destroy fiber object, executing finally block. 30 fiber
|
H A D | resume-running-fiber.phpt | 2 Resume running fiber 4 fiber 8 $fiber = new Fiber(function (): void { 13 $fiber->start(); 17 Fatal error: Uncaught FiberError: Cannot resume a fiber that is not suspended in %sresume-running-f… 19 #0 %sresume-running-fiber.php(%d): Fiber->resume() 21 #2 %sresume-running-fiber.php(%d): Fiber->start() 23 thrown in %sresume-running-fiber.php on line %d
|
H A D | resume-non-running-fiber.phpt | 2 Resume non-running fiber 4 fiber 8 $fiber = new Fiber(fn() => null); 10 $fiber->resume(); 14 …tal error: Uncaught FiberError: Cannot resume a fiber that is not suspended in %sresume-non-runnin… 16 #0 %sresume-non-running-fiber.php(%d): Fiber->resume() 18 thrown in %sresume-non-running-fiber.php on line %d
|
H A D | suspend-in-force-close-fiber.phpt | 2 Suspend in force-closed fiber 4 fiber 8 $fiber = new Fiber(function (): void { 16 $fiber->start(); 18 unset($fiber); 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() 28 Next FiberError: Cannot suspend in a force-closed fiber in %ssuspend-in-force-close-fiber.php:%d 30 #0 %ssuspend-in-force-close-fiber.php(%d): Fiber::suspend() 33 thrown in %ssuspend-in-force-close-fiber.php on line %d
|
H A D | failing-fiber.phpt | 2 Test throwing from fiber 4 fiber 8 $fiber = new Fiber(function (): void { 13 $value = $fiber->start(); 16 $fiber->resume($value); 22 Fatal error: Uncaught Exception: test in %sfailing-fiber.php:%d 25 #1 %sfailing-fiber.php(%d): Fiber->resume('test') 27 thrown in %sfailing-fiber.php on line %d
|
H A D | unfinished-fiber.phpt | 2 Test unfinished fiber 4 fiber 8 $fiber = new Fiber(function (): void { 10 echo "fiber\n"; 17 echo "end of fiber should not be reached\n"; 20 $fiber->start(); 26 fiber
|
H A D | unfinished-fiber-with-suspend-in-finally.phpt | 2 Test unfinished fiber with suspend in finally 4 fiber 8 $fiber = new Fiber(function (): object { 11 echo "fiber\n"; 24 echo "end of fiber should not be reached\n"; 27 $fiber->start(); 29 unset($fiber); // Destroy fiber object, executing finally block. 35 fiber
|
H A D | throw-into-non-running-fiber.phpt | 2 Throw into non-running fiber 4 fiber 8 $fiber = new Fiber(fn() => null); 10 $fiber->throw(new Exception('test')); 14 …l error: Uncaught FiberError: Cannot resume a fiber that is not suspended in %sthrow-into-non-runn… 16 #0 %sthrow-into-non-running-fiber.php(%d): Fiber->throw(Object(Exception)) 18 thrown in %sthrow-into-non-running-fiber.php on line %d
|
H A D | gc-cycle-callback.phpt | 2 GC can cleanup cycle when callback references fiber 4 fiber 9 public $fiber; 16 $fiber = new Fiber(function () use ($ref) { 20 $ref->fiber = $fiber; 22 $fiber = null;
|
H A D | fiber-in-shutdown-function.phpt | 4 fiber 9 $fiber = new Fiber(function (): int { 15 var_dump($fiber->start()); 16 var_dump($fiber->resume()); 17 var_dump($fiber->resume()); 18 var_dump($fiber->getReturn());
|
H A D | get-return.phpt | 2 Test fiber return value 4 fiber 8 $fiber = new Fiber(function (): string { 13 $value = $fiber->start(); 15 var_dump($fiber->resume($value . "y")); 16 var_dump($fiber->getReturn());
|
H A D | out-of-memory-in-recursive-fiber.phpt | 2 Out of Memory from recursive fiber creation 4 fiber 18 $fiber = new Fiber('create_fiber'); 19 $fiber->start(); 20 return $fiber; 23 $fiber = new Fiber('create_fiber'); 24 $fiber->start(); 28 … bytes exhausted%s(tried to allocate %d bytes) in %sout-of-memory-in-recursive-fiber.php on line %d
|
H A D | exit-in-fiber.phpt | 2 Exit from fiber 4 fiber 8 $fiber = new Fiber(function (): void { 14 $fiber->start(); 16 $fiber->resume();
|