Home
last modified time | relevance | path

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

123456

/PHP-8.2/ext/zend_test/
H A Dfiber.c69 fiber->caller = NULL; in zend_test_fiber_suspend()
101 zend_call_function(&fiber->fci, &fiber->fci_cache); in zend_test_fiber_execute()
128 if (fiber->target) { in zend_test_fiber_execute()
133 ZVAL_COPY(&fiber->target->result, &fiber->result); in zend_test_fiber_execute()
134 fiber->target->fci.params = &fiber->target->result; in zend_test_fiber_execute()
137 fiber->target->caller = fiber->caller; in zend_test_fiber_execute()
156 return &fiber->std; in zend_test_fiber_object_create()
202 if (fiber->target) { in zend_test_fiber_object_free()
232 Z_PARAM_FUNC(fiber->fci, fiber->fci_cache) in ZEND_METHOD()
263 fiber->previous = &fiber->context; in ZEND_METHOD()
[all …]
/PHP-8.2/Zend/tests/fibers/
H A Dfiber-status.phpt6 $fiber = new Fiber(function (): void {
7 $fiber = Fiber::getCurrent();
9 var_dump($fiber->isStarted());
10 var_dump($fiber->isRunning());
29 var_dump($fiber->isStarted());
30 var_dump($fiber->isRunning());
34 $fiber->start();
37 var_dump($fiber->isStarted());
38 var_dump($fiber->isRunning());
42 $fiber->resume();
[all …]
H A Dgc-cycle-result.phpt2 GC can cleanup cycle when fiber result references fiber
6 $fiber = null;
7 $fiber = new Fiber(function () use (&$fiber) {
8 return new class($fiber) {
9 private $fiber;
11 public function __construct($fiber) {
12 $this->fiber = $fiber;
21 $fiber->start();
27 var_dump($fiber->isTerminated());
29 unset($fiber);
H A Dfatal-error-in-nested-fiber.phpt2 Fatal error within a nested fiber
6 $fiber = new Fiber(function (): void {
7 $fiber = new Fiber(function (): void {
9 trigger_error("Fatal error in nested fiber", E_USER_ERROR);
12 var_dump($fiber->start());
16 $fiber->resume();
19 var_dump($fiber->start());
21 $fiber->resume();
28 Fatal error: Fatal error in nested fiber in %sfatal-error-in-nested-fiber.php on line %d
H A Dfailing-nested-fiber.phpt2 Test throwing from fiber
6 $fiber = new Fiber(function (): void {
7 $fiber = new Fiber(function (int $x, int $y): void {
12 $value = $fiber->start(1, 2);
14 $fiber->resume($value);
17 $fiber->start();
23 Fatal error: Uncaught Exception: test in %sfailing-nested-fiber.php:6
26 #1 %sfailing-nested-fiber.php(%d): Fiber->resume(3)
28 #3 %sfailing-nested-fiber.php(%d): Fiber->start()
30 thrown in %sfailing-nested-fiber.php on line %d
H A Dget-return-in-unfinished-fiber.phpt2 Fiber::getReturn() in unfinished fiber
6 $fiber = new Fiber(fn() => Fiber::suspend(1));
8 var_dump($fiber->start());
10 $fiber->getReturn();
16 …r: Uncaught FiberError: Cannot get fiber return value: The fiber has not returned in %sget-return-…
18 #0 %sget-return-in-unfinished-fiber.php(%d): Fiber->getReturn()
20 thrown in %sget-return-in-unfinished-fiber.php on line %d
H A Dresume-terminated-fiber.phpt2 Resume terminated fiber
6 $fiber = new Fiber(fn() => null);
8 $fiber->start();
10 $fiber->resume();
14 …tal error: Uncaught FiberError: Cannot resume a fiber that is not suspended in %sresume-terminated…
16 #0 %sresume-terminated-fiber.php(%d): Fiber->resume()
18 thrown in %sresume-terminated-fiber.php on line %d
H A Dget-return-from-unstarted-fiber.phpt2 Fiber::getReturn() from unstarted fiber
6 $fiber = new Fiber(fn() => Fiber::suspend(1));
8 $fiber->getReturn();
12 … Uncaught FiberError: Cannot get fiber return value: The fiber has not been started in %sget-retur…
14 #0 %sget-return-from-unstarted-fiber.php(%d): Fiber->getReturn()
16 thrown in %sget-return-from-unstarted-fiber.php on line %d
H A Dunfinished-fiber-with-finally.phpt2 Test unfinished fiber with finally block
6 $fiber = new Fiber(function (): void {
8 echo "fiber\n";
17 echo "end of fiber should not be reached\n";
20 $fiber->start();
22 unset($fiber); // Destroy fiber object, executing finally block.
28 fiber
H A Dresume-running-fiber.phpt2 Resume running fiber
6 $fiber = new Fiber(function (): void {
11 $fiber->start();
15 Fatal error: Uncaught FiberError: Cannot resume a fiber that is not suspended in %sresume-running-f…
17 #0 %sresume-running-fiber.php(%d): Fiber->resume()
19 #2 %sresume-running-fiber.php(%d): Fiber->start()
21 thrown in %sresume-running-fiber.php on line %d
H A Dno-switch-dtor-resume.phpt2 Cannot resume fiber within destructor
6 $fiber = new Fiber(function () {
9 $fiber->start();
11 return new class ($fiber) {
12 private $fiber;
14 public function __construct(Fiber $fiber) {
15 $this->fiber = $fiber;
19 $this->fiber->resume(1);
H A Dresume-previous-fiber.phpt2 Resume previous fiber
6 $fiber = new Fiber(function (): void {
16 $fiber->start();
20 …atal error: Uncaught FiberError: Cannot resume a fiber that is not suspended in %sresume-previous-
22 #0 %sresume-previous-fiber.php(%d): Fiber->resume()
24 #2 %sresume-previous-fiber.php(%d): Fiber->start()
26 #4 %sresume-previous-fiber.php(%d): Fiber->start()
28 thrown in %sresume-previous-fiber.php on line %d
H A Dno-switch-dtor-throw.phpt2 Cannot resume fiber within destructor
6 $fiber = new Fiber(function () {
9 $fiber->start();
11 return new class ($fiber) {
12 private $fiber;
14 public function __construct(Fiber $fiber) {
15 $this->fiber = $fiber;
19 $this->fiber->throw(new Error());
H A Dsuspend-in-force-close-fiber.phpt2 Suspend in force-closed fiber
6 $fiber = new Fiber(function (): void {
14 $fiber->start();
16 unset($fiber);
20 …r: Uncaught FiberError: Cannot suspend in a force-closed fiber in %ssuspend-in-force-close-fiber.p…
22 #0 %ssuspend-in-force-close-fiber.php(%d): Fiber::suspend()
25 thrown in %ssuspend-in-force-close-fiber.php on line %d
H A Dcall-to-ctor-of-terminated-fiber.phpt2 Multiple calls to constructor are prevented after fiber terminated
6 $fiber = new Fiber(function () {
10 var_dump($fiber->start());
11 var_dump($fiber->getReturn());
13 $fiber->__construct(function () {
22 …or: Uncaught FiberError: Cannot call constructor twice in %scall-to-ctor-of-terminated-fiber.php:%d
24 #0 %scall-to-ctor-of-terminated-fiber.php(%d): Fiber->__construct(Object(Closure))
26 thrown in %scall-to-ctor-of-terminated-fiber.php on line %d
H A Dresume-non-running-fiber.phpt2 Resume non-running fiber
6 $fiber = new Fiber(fn() => null);
8 $fiber->resume();
12 …tal error: Uncaught FiberError: Cannot resume a fiber that is not suspended in %sresume-non-runnin…
14 #0 %sresume-non-running-fiber.php(%d): Fiber->resume()
16 thrown in %sresume-non-running-fiber.php on line %d
H A Dunfinished-fiber-with-suspend-in-finally.phpt2 Test unfinished fiber with suspend in finally
6 $fiber = new Fiber(function (): object {
9 echo "fiber\n";
22 echo "end of fiber should not be reached\n";
25 $fiber->start();
27 unset($fiber); // Destroy fiber object, executing finally block.
33 fiber
H A Dfast-finish-fiber.phpt2 Fast finishing fiber does not leak
6 $fiber = new Fiber(fn() => 'test');
7 var_dump($fiber->isStarted());
8 var_dump($fiber->start());
9 var_dump($fiber->getReturn());
10 var_dump($fiber->isTerminated());
H A Dfatal-error-in-fiber.phpt2 Fatal error in new fiber
6 $fiber = new Fiber(function (): void {
7 trigger_error("Fatal error in fiber", E_USER_ERROR);
10 $fiber->start();
14 Fatal error: Fatal error in fiber in %sfatal-error-in-fiber.php on line %d
H A Dfailing-fiber.phpt2 Test throwing from fiber
6 $fiber = new Fiber(function (): void {
11 $value = $fiber->start();
14 $fiber->resume($value);
20 Fatal error: Uncaught Exception: test in %sfailing-fiber.php:%d
23 #1 %sfailing-fiber.php(%d): Fiber->resume('test')
25 thrown in %sfailing-fiber.php on line %d
/PHP-8.2/ext/zend_test/tests/
H A Dobserver_fiber_03.phpt12 $fiber = new Fiber(function (): void {
23 $fiber->start();
28 $fiber->resume();
33 $fiber->resume();
36 $fiber->start();
37 $fiber->resume();
38 $fiber->resume();
39 $fiber->resume();
46 <!-- switching from fiber %s to %s -->
50 <!-- switching from fiber %s to %s -->
[all …]
H A Dobserver_fiber_04.phpt2 Observer: Nested fibers with unfinished fiber
12 $fiber = new Fiber(function (): void {
19 $fiber->start();
24 $fiber->start();
25 $fiber->resume();
26 $fiber->resume();
33 <!-- switching from fiber %s to %s -->
37 <!-- switching from fiber %s to %s -->
40 <!-- switching from fiber %s to %s -->
42 <!-- switching from fiber %s to %s -->
[all …]
H A Dobserver_fiber_05.phpt12 $fiber = new Fiber(function (): void {
19 $fiber->start();
24 $fiber->start();
25 $fiber->resume();
32 <!-- switching from fiber %s to %s -->
36 <!-- switching from fiber %s to %s -->
39 <!-- switching from fiber %s to %s -->
41 <!-- switching from fiber %s to %s -->
44 <!-- switching from fiber %s to %s -->
46 <!-- switching from fiber %s to %s -->
[all …]
/PHP-8.2/Zend/
H A Dzend_fibers.c500 fiber->stack_bottom = fiber->execute_data; in zend_fiber_execute()
511 fiber->fci.retval = &fiber->result; in zend_fiber_execute()
513 zend_call_function(&fiber->fci, &fiber->fci_cache); in zend_fiber_execute()
741 fiber->fci = fci; in ZEND_METHOD()
753 Z_PARAM_VARIADIC_WITH_NAMED(fiber->fci.params, fiber->fci.param_count, fiber->fci.named_params); in ZEND_METHOD()
770 fiber->previous = &fiber->context; in ZEND_METHOD()
814 zend_fiber *fiber; in ZEND_METHOD() local
843 zend_fiber *fiber; in ZEND_METHOD() local
871 zend_fiber *fiber; in ZEND_METHOD() local
882 zend_fiber *fiber; in ZEND_METHOD() local
[all …]
/PHP-8.2/Zend/tests/
H A Dgh9916-005.phpt2 Bug GH-9916 005 (Entering shutdown sequence with a fiber suspended in a Generator emits an unavoida…
7 $fiber = yield;
12 $fiber = new Fiber(function() use ($gen, &$fiber) {
13 $gen->send($fiber);
16 $fiber->start();
19 $fiber = null;

Completed in 26 milliseconds

123456