1
0
mirror of https://github.com/danog/parallel.git synced 2024-11-26 20:34:40 +01:00
This commit is contained in:
Max Furtuna 2018-12-14 18:16:11 +02:00 committed by Aaron Piotrowski
parent a5ae5b8d26
commit c4eed9535b
No known key found for this signature in database
GPG Key ID: ADD1EF783EDE9EEB

View File

@ -201,4 +201,20 @@ abstract class AbstractPoolTest extends TestCase
}
});
}
public function testPooledKill()
{
$exception = null;
try {
Loop::run(function () {
$pool = $this->createPool(1);
$worker = $pool->getWorker();
$worker->kill();
$worker2 = $pool->getWorker();
unset($worker); // Invoke destructor.
});
} catch (\Throwable $exception) {
}
$this->assertNull($exception);
}
}