mirror of
https://github.com/danog/parallel.git
synced 2024-11-26 20:34:40 +01:00
Test for #66
This commit is contained in:
parent
a5ae5b8d26
commit
c4eed9535b
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user