Home
last modified time | relevance | path

Searched refs:fiber (Results 1 – 25 of 73) sorted by relevance

123

/ext-fiber/src/
H A Dphp_fiber.c50 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 Dfiber.c156 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 Dfiber-status.phpt4 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 Dgc-cycle-result.phpt2 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 Dfatal-error-in-nested-fiber.phpt2 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 Dresume-terminated-fiber.phpt2 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 Dget-return-in-unfinished-fiber.phpt2 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 Dfast-finish-fiber.phpt2 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 Dfailing-nested-fiber.phpt2 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 Dfiber-in-destruct.phpt2 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 Dfatal-error-in-fiber.phpt2 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 Dget-return-from-unstarted-fiber.phpt2 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 Dunfinished-fiber-with-finally.phpt2 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 Dresume-running-fiber.phpt2 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 Dresume-non-running-fiber.phpt2 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 Dsuspend-in-force-close-fiber.phpt2 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 Dfailing-fiber.phpt2 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 Dunfinished-fiber.phpt2 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 Dunfinished-fiber-with-suspend-in-finally.phpt2 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 Dthrow-into-non-running-fiber.phpt2 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 Dgc-cycle-callback.phpt2 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 Dfiber-in-shutdown-function.phpt4 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 Dget-return.phpt2 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 Dout-of-memory-in-recursive-fiber.phpt2 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 Dexit-in-fiber.phpt2 Exit from fiber
4 fiber
8 $fiber = new Fiber(function (): void {
14 $fiber->start();
16 $fiber->resume();

Completed in 33 milliseconds

123