Home
last modified time | relevance | path

Searched refs:Fiber (Results 1 – 25 of 63) sorted by relevance

123

/ext-fiber/tests/
H A Dfiber-get-current.phpt2 Fiber::getCurrent()
8 var_dump(Fiber::getCurrent());
10 $fiber = new Fiber(function (): void {
11 var_dump(Fiber::getCurrent());
19 object(Fiber)#%d (0) {
H A Dthrow-in-multiple-destroyed-fibers-after-shutdown.phpt8 $fiber = new Fiber(function (): void {
9 $fiber1 = new Fiber(function (): void {
11 Fiber::suspend();
19 $fiber2 = new Fiber(function (): void {
21 Fiber::suspend();
29 Fiber::suspend();
42 #0 %sthrow-in-multiple-destroyed-fibers-after-shutdown.php(%d): Fiber::suspend()
46 Next FiberExit: Fiber destroyed in %sthrow-in-multiple-destroyed-fibers-after-shutdown.php:%d
48 #0 %sthrow-in-multiple-destroyed-fibers-after-shutdown.php(%d): Fiber::suspend()
57 Next FiberExit: Fiber destroyed in %sthrow-in-multiple-destroyed-fibers-after-shutdown.php:%d
[all …]
H A Dfiber-in-shutdown-function.phpt2 Fiber in shutdown function
9 $fiber = new Fiber(function (): int {
10 Fiber::suspend(1);
11 Fiber::suspend(2);
H A Dfiber-in-destruct.phpt8 $fiber = new Fiber(function (): int {
12 Fiber::suspend(2);
16 Fiber::suspend(1);
20 Fiber::suspend(3);
H A Dsuspend-in-force-close-fiber.phpt8 $fiber = new Fiber(function (): void {
10 Fiber::suspend();
12 Fiber::suspend();
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()
30 #0 %ssuspend-in-force-close-fiber.php(%d): Fiber::suspend()
H A Dfailing-nested-fiber.phpt8 $fiber = new Fiber(function (): void {
9 $fiber = new Fiber(function (int $x, int $y): void {
10 Fiber::suspend($x + $y);
28 #1 %sfailing-nested-fiber.php(%d): Fiber->resume(3)
30 #3 %sfailing-nested-fiber.php(%d): Fiber->start()
H A Dstart-arguments.phpt8 $fiber = new Fiber(function (int $x): int {
9 return $x + Fiber::suspend($x);
16 $fiber = new Fiber(function (int $x): int {
17 return $x + Fiber::suspend($x);
29 #1 %sstart-arguments.php(%d): Fiber->start('test')
H A Dfatal-error-in-nested-fiber.phpt8 $fiber = new Fiber(function (): void {
9 $fiber = new Fiber(function (): void {
10 \Fiber::suspend(2);
16 \Fiber::suspend(1);
H A Dsuspend-in-force-close-fiber-after-shutdown.phpt8 $fiber = new Fiber(function (): void {
10 Fiber::suspend();
12 Fiber::suspend();
24 Fatal error: Uncaught FiberExit: Fiber destroyed in %ssuspend-in-force-close-fiber-after-shutdown.p…
26 #0 %ssuspend-in-force-close-fiber-after-shutdown.php(%d): Fiber::suspend()
32 #0 %ssuspend-in-force-close-fiber-after-shutdown.php(%d): Fiber::suspend()
H A Dfiber-created-in-destruct.phpt2 Fiber created in destructor
11 $fiber = new Fiber(static function (): int {
12 Fiber::suspend(1);
H A Dfatal-error-with-multiple-fibers.phpt8 $fiber1 = new Fiber(function (): void {
10 \Fiber::suspend(1);
16 $fiber2 = new Fiber(function (): void {
17 \Fiber::suspend(2);
H A Dfiber-created-during-cleanup.phpt10 $fibers[$i] = new Fiber(function() {
12 Fiber::suspend();
15 $fiber2 = new Fiber(function() {
18 Fiber::suspend();
H A Dget-return-from-unstarted-fiber.phpt2 Fiber::getReturn() from unstarted fiber
8 $fiber = new Fiber(fn() => Fiber::suspend(1));
16 #0 %sget-return-from-unstarted-fiber.php(%d): Fiber->getReturn()
H A Dfiber-status.phpt2 Fiber status methods
8 $fiber = new Fiber(function (): void {
9 $fiber = Fiber::getCurrent();
10 echo "\nWithin Fiber:\n";
15 Fiber::suspend();
48 Within Fiber:
H A Dget-return-in-unfinished-fiber.phpt2 Fiber::getReturn() in unfinished fiber
8 $fiber = new Fiber(fn() => Fiber::suspend(1));
20 #0 %sget-return-in-unfinished-fiber.php(%d): Fiber->getReturn()
H A Dresume-running-fiber.phpt8 $fiber = new Fiber(function (): void {
9 $self = Fiber::getCurrent();
19 #0 %sresume-running-fiber.php(%d): Fiber->resume()
21 #2 %sresume-running-fiber.php(%d): Fiber->start()
H A Dthrow-during-fiber-destruct.phpt7 $fiber = new Fiber(function() {
9 Fiber::suspend();
19 Fatal error: Uncaught FiberExit: Fiber destroyed in %s:%d
21 #0 %s(%d): Fiber::suspend()
H A Dfiber-throw-in-destruct.phpt2 Fiber throwing from destructor
11 $fiber = new Fiber(static function (): int {
12 Fiber::suspend(1);
28 #1 %sfiber-throw-in-destruct.php(%d): Fiber->resume()
H A Dcatch-then-suspend.phpt8 $fiber = new Fiber(function () {
10 Fiber::suspend('in try');
14 Fiber::suspend('after catch');
H A Dsuspend-in-nested-function.phpt10 return Fiber::suspend(1);
13 $fiber = new Fiber(function (): int {
15 return Fiber::suspend($value);
/ext-fiber/
H A Dfiber_arginfo.h63 ZEND_METHOD(Fiber, __construct);
64 ZEND_METHOD(Fiber, start);
65 ZEND_METHOD(Fiber, resume);
66 ZEND_METHOD(Fiber, throw);
67 ZEND_METHOD(Fiber, isStarted);
68 ZEND_METHOD(Fiber, isSuspended);
69 ZEND_METHOD(Fiber, isRunning);
70 ZEND_METHOD(Fiber, isTerminated);
71 ZEND_METHOD(Fiber, getReturn);
72 ZEND_METHOD(Fiber, getCurrent);
[all …]
H A Dfiber.stub.php6 final class Fiber class
26 public static function getCurrent(): ?Fiber {}
33 public function __construct(Fiber $fiber) {}
35 public function getFiber(): Fiber {}
H A DREADME.md1 # Fiber Extension
3 Fiber implementation for PHP using native C fibers.
31 final class Fiber
113 * @param mixed $value Value to return from {@see Fiber::resume()} or {@see Fiber::throw()}.
124Fiber` object is created using `new Fiber(callable $callback)` with any callable. The callable nee…
130 * returning a value from `Fiber::suspend()` using `Fiber->resume()`
131 * throwing an exception from `Fiber::suspend()` using `Fiber->throw()`
147 * @param Fiber $fiber Any Fiber object, including those that are not started or have
153 * @return Fiber The reflected Fiber object.
155 public function getFiber(): Fiber {}
[all …]
/ext-fiber/stubs/
H A DReflectionFiber.php6 * @param Fiber $fiber Any Fiber object, including those that are not started or have
9 public function __construct(Fiber $fiber) {}
12 * @return Fiber The reflected Fiber object.
14 public function getFiber(): Fiber {}
/ext-fiber/examples/
H A D001-simple.php3 $fiber = new Fiber(function (): void {
4 $value = Fiber::suspend('fiber');

Completed in 21 milliseconds

123