mirror of
https://github.com/danog/parallel.git
synced 2024-11-30 04:39:01 +01:00
Check if watcher has already been cancelled
This seems to only happen in 7.1 for some reason… will perhaps need to dig further into why.
This commit is contained in:
parent
2191d1145b
commit
c1f6b62799
@ -283,7 +283,7 @@ final class Parallel implements Context
|
|||||||
|
|
||||||
unset(self::$futures[$this->id], self::$channels[$this->id]);
|
unset(self::$futures[$this->id], self::$channels[$this->id]);
|
||||||
|
|
||||||
if (empty(self::$futures)) {
|
if (empty(self::$futures) && self::$watcher !== null) {
|
||||||
Loop::cancel(self::$watcher);
|
Loop::cancel(self::$watcher);
|
||||||
self::$watcher = null;
|
self::$watcher = null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user