Home
last modified time | relevance | path

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

12345

/PHP-8.1/ext/zend_test/
H A Dfiber.c69 fiber->caller = NULL; in zend_test_fiber_suspend()
100 zend_call_function(&fiber->fci, &fiber->fci_cache); in zend_test_fiber_execute()
127 if (fiber->target) { in zend_test_fiber_execute()
132 ZVAL_COPY(&fiber->target->result, &fiber->result); in zend_test_fiber_execute()
133 fiber->target->fci.params = &fiber->target->result; in zend_test_fiber_execute()
136 fiber->target->caller = fiber->caller; in zend_test_fiber_execute()
155 return &fiber->std; in zend_test_fiber_object_create()
201 if (fiber->target) { in zend_test_fiber_object_free()
231 Z_PARAM_FUNC(fiber->fci, fiber->fci_cache) in ZEND_METHOD()
262 fiber->previous = &fiber->context; in ZEND_METHOD()
[all …]
/PHP-8.1/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 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-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 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 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.1/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();
44 <!-- switching from fiber %s to %s -->
47 <!-- 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();
31 <!-- switching from fiber %s to %s -->
34 <!-- switching from fiber %s to %s -->
36 <!-- switching from fiber %s to %s -->
38 <!-- 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();
30 <!-- switching from fiber %s to %s -->
33 <!-- switching from fiber %s to %s -->
35 <!-- 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_06.phpt2 Observer: Throwing fiber
12 $fiber = new Fiber(function (): void {
16 $fiber->start();
19 $fiber->throw(new Exception);
27 <!-- switching from fiber %s to %s -->
30 <!-- switching from fiber %s to %s -->
32 <!-- switching from fiber %s to %s -->
34 <!-- switching from fiber %s to %s -->
H A Dobserver_fiber_01.phpt2 Observer: Basic fiber switching
14 $fiber = new Fiber(function (): void {
18 $fiber->start();
19 $fiber->resume();
25 <!-- switching from fiber %s to %s -->
28 <!-- switching from fiber %s to %s -->
30 <!-- switching from fiber %s to %s -->
32 <!-- switching from fiber %s to %s -->
/PHP-8.1/Zend/
H A Dzend_fibers.c471 fiber->stack_bottom = fiber->execute_data; in zend_fiber_execute()
482 fiber->fci.retval = &fiber->result; in zend_fiber_execute()
484 zend_call_function(&fiber->fci, &fiber->fci_cache); in zend_fiber_execute()
685 Z_PARAM_FUNC(fiber->fci, fiber->fci_cache) in ZEND_METHOD()
697 Z_PARAM_VARIADIC_WITH_NAMED(fiber->fci.params, fiber->fci.param_count, fiber->fci.named_params); in ZEND_METHOD()
714 fiber->previous = &fiber->context; in ZEND_METHOD()
758 zend_fiber *fiber; in ZEND_METHOD() local
787 zend_fiber *fiber; in ZEND_METHOD() local
815 zend_fiber *fiber; in ZEND_METHOD() local
826 zend_fiber *fiber; in ZEND_METHOD() local
[all …]

Completed in 32 milliseconds

12345