File tree 2 files changed +17
-2
lines changed
src/Symfony/Component/Process 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 1
1
CHANGELOG
2
2
=========
3
+ 5.4.0
4
+
5
+ -----
6
+
7
+ * added support for ` Fiber `
3
8
4
9
5.2.0
5
10
-----
Original file line number Diff line number Diff line change @@ -427,12 +427,22 @@ public function wait(callable $callback = null)
427
427
do {
428
428
$ this ->checkTimeout ();
429
429
$ running = '\\' === \DIRECTORY_SEPARATOR ? $ this ->isRunning () : $ this ->processPipes ->areOpen ();
430
- $ this ->readPipes ($ running , '\\' !== \DIRECTORY_SEPARATOR || !$ running );
430
+
431
+ if (\PHP_VERSION_ID >= 80100 && \Fiber::getCurrent ()) {
432
+ $ this ->readPipes (false , '\\' !== \DIRECTORY_SEPARATOR || !$ running );
433
+ \Fiber::suspend ();
434
+ } else {
435
+ $ this ->readPipes ($ running , '\\' !== \DIRECTORY_SEPARATOR || !$ running );
436
+ }
431
437
} while ($ running );
432
438
433
439
while ($ this ->isRunning ()) {
434
440
$ this ->checkTimeout ();
435
- usleep (1000 );
441
+ if (\PHP_VERSION_ID >= 80100 && \Fiber::getCurrent ()) {
442
+ \Fiber::suspend ();
443
+ } else {
444
+ usleep (1000 );
445
+ }
436
446
}
437
447
438
448
if ($ this ->processInformation ['signaled ' ] && $ this ->processInformation ['termsig ' ] !== $ this ->latestSignal ) {
You can’t perform that action at this time.
0 commit comments