1
0
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:
coderstephen 2015-07-15 18:36:42 -05:00
parent 1f76fcadb2
commit 9337d3a8ea

View File

@ -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;
} }