mirror of
https://github.com/danog/parallel.git
synced 2024-11-30 04:39:01 +01:00
Fix bug where shared data would sometimes disappear
This commit is contained in:
parent
1f76fcadb2
commit
9337d3a8ea
@ -76,8 +76,8 @@ abstract class ThreadContext implements ContextInterface
|
|||||||
$this->socket->read(1)->then(function ($data) {
|
$this->socket->read(1)->then(function ($data) {
|
||||||
$message = ord($data);
|
$message = ord($data);
|
||||||
if ($message === Thread::MSG_DONE) {
|
if ($message === Thread::MSG_DONE) {
|
||||||
$this->thread->join();
|
|
||||||
$this->deferredJoin->resolve();
|
$this->deferredJoin->resolve();
|
||||||
|
$this->thread->join();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user