Home
last modified time | relevance | path

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

123456

/php-src/ext/zend_test/
H A Dfiber.c69 fiber->caller = NULL; in zend_test_fiber_suspend()
105 zend_call_function(&fiber->fci, &fiber->fci_cache); in zend_test_fiber_execute()
132 if (fiber->target) { in zend_test_fiber_execute()
137 ZVAL_COPY(&fiber->target->result, &fiber->result); in zend_test_fiber_execute()
138 fiber->target->fci.params = &fiber->target->result; in zend_test_fiber_execute()
141 fiber->target->caller = fiber->caller; in zend_test_fiber_execute()
159 return &fiber->std; in zend_test_fiber_object_create()
205 if (fiber->target) { in zend_test_fiber_object_free()
235 Z_PARAM_FUNC(fiber->fci, fiber->fci_cache) in ZEND_METHOD()
266 fiber->previous = &fiber->context; in ZEND_METHOD()
[all …]
/php-src/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 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 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 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();
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
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-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 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 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 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
H A Dsilence-operator-outside-fiber.phpt2 Silence operator does not leak into fiber
6 $fiber = @new Fiber(function (): void {
12 @$fiber->start();
16 @$fiber->resume();
22 Warning: Warning A in %ssilence-operator-outside-fiber.php on line %d
24 Warning: Warning B in %ssilence-operator-outside-fiber.php on line %d
26 Warning: Warning C in %ssilence-operator-outside-fiber.php on line %d
28 Warning: Warning D in %ssilence-operator-outside-fiber.php on line %d
H A Dout-of-memory-in-recursive-fiber.phpt2 Out of Memory from recursive fiber creation
16 $fiber = new Fiber('create_fiber');
17 $fiber->start();
18 return $fiber;
21 $fiber = new Fiber('create_fiber');
22 $fiber->start();
26 … bytes exhausted%s(tried to allocate %d bytes) in %sout-of-memory-in-recursive-fiber.php on line %d
H A Dthrow-into-non-running-fiber.phpt2 Throw into non-running fiber
6 $fiber = new Fiber(fn() => null);
8 $fiber->throw(new Exception('test'));
12 …l error: Uncaught FiberError: Cannot resume a fiber that is not suspended in %sthrow-into-non-runn…
14 #0 %sthrow-into-non-running-fiber.php(%d): Fiber->throw(Object(Exception))
16 thrown in %sthrow-into-non-running-fiber.php on line %d
/php-src/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-src/Zend/
H A Dzend_fibers.c586 fiber->stack_bottom = fiber->execute_data; in zend_fiber_execute()
602 fiber->fci.retval = &fiber->result; in zend_fiber_execute()
604 zend_call_function(&fiber->fci, &fiber->fci_cache); in zend_fiber_execute()
715 fiber->previous = &fiber->context; in zend_fiber_start()
883 fiber->fci = fci; in ZEND_METHOD()
895 Z_PARAM_VARIADIC_WITH_NAMED(fiber->fci.params, fiber->fci.param_count, fiber->fci.named_params); in ZEND_METHOD()
912 fiber->previous = &fiber->context; in ZEND_METHOD()
956 zend_fiber *fiber; in ZEND_METHOD() local
985 zend_fiber *fiber; in ZEND_METHOD() local
1013 zend_fiber *fiber; in ZEND_METHOD() local
[all …]
/php-src/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 25 milliseconds

123456