Created
May 5, 2015 14:29
-
-
Save jsor/52bde3f82014e3898758 to your computer and use it in GitHub Desktop.
ReactLoopQueue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace React\Promise\Queue; | |
use React\EventLoop\LoopInterface; | |
class ReactLoopQueue implements QueueInterface | |
{ | |
private $loop; | |
public function __construct(LoopInterface $loop) | |
{ | |
$this->loop = $loop; | |
} | |
public function enqueue(callable $task) | |
{ | |
$this->loop->nextTick($task); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment