diff --git a/lib/Threading/Internal/Thread.php b/lib/Threading/Internal/Thread.php index e8bda59..62f1d21 100644 --- a/lib/Threading/Internal/Thread.php +++ b/lib/Threading/Internal/Thread.php @@ -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) {