Skip to content

Commit cbbbd36

Browse files
committed
Smoother parallel process quitting when the child process crashes
1 parent 3c56362 commit cbbbd36

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Parallel/ParallelAnalyser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function analyse(
7676
$process = $this->processPool->getProcess($identifier);
7777
$process->bindConnection($decoder, $encoder);
7878
if (count($jobs) === 0) {
79-
$this->processPool->quitProcess($identifier);
79+
$this->processPool->tryQuitProcess($identifier);
8080
return;
8181
}
8282

@@ -174,7 +174,7 @@ public function analyse(
174174
}
175175

176176
if (count($jobs) === 0) {
177-
$this->processPool->quitProcess($processIdentifier);
177+
$this->processPool->tryQuitProcess($processIdentifier);
178178
return;
179179
}
180180

src/Parallel/ProcessPool.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function tryQuitProcess(string $identifier): void
4141
$this->quitProcess($identifier);
4242
}
4343

44-
public function quitProcess(string $identifier): void
44+
private function quitProcess(string $identifier): void
4545
{
4646
$process = $this->getProcess($identifier);
4747
$process->quit();

0 commit comments

Comments
 (0)