Skip to content

Instantly share code, notes, and snippets.

@mmoreram
Created August 21, 2019 11:00
Show Gist options
  • Save mmoreram/a812dc33db0413e799bdf49138756357 to your computer and use it in GitHub Desktop.
Save mmoreram/a812dc33db0413e799bdf49138756357 to your computer and use it in GitHub Desktop.
$p1 = $client->blpop('queue', 0)->then(function() use ($client) {
var_dump('Hey1');
return $client->get('whatever')->then(function($val) {
var_dump('Yeah1');
die();
});
});
$p2 = $client->blpop('queue', 0)->then(function() use ($client) {
var_dump('Hey2');
return $client->get('whatever')->then(function($val) {
var_dump('Yeah2');
die();
});
});
Block\awaitAll([$p1, $p2], $loop);
die();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment