mirror of
https://github.com/danog/parallel.git
synced 2024-11-26 20:34:40 +01:00
Exit thread immediately if killed while loading autoloader
This commit is contained in:
parent
58ce0df037
commit
f716981c95
@ -82,6 +82,10 @@ class Thread extends \Thread {
|
||||
|
||||
// At this point, the thread environment has been prepared so begin using the thread.
|
||||
|
||||
if ($this->killed) {
|
||||
return; // Thread killed while requiring autoloader, simply exit.
|
||||
}
|
||||
|
||||
Loop::run(function () {
|
||||
$watcher = Loop::repeat(self::KILL_CHECK_FREQUENCY, function () {
|
||||
if ($this->killed) {
|
||||
|
Loading…
Reference in New Issue
Block a user