Created
January 19, 2015 20:02
-
-
Save WyriHaximus/b574d0d1e793b8419f61 to your computer and use it in GitHub Desktop.
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
return futurePromise($loop)->then(function () use ($loop, $check) { | |
$result = $check(); | |
if ($result !== false) { | |
return $result; | |
} | |
return tickingFuturePromise($loop, $check); | |
}); | |
/*$deferred = new Deferred(); | |
$loop->futureTick(function () use ($deferred, $check, $loop) { | |
$deferred->progress(time()); | |
$result = $check(); | |
if ($result !== false) { | |
$deferred->resolve($result); | |
return; | |
} | |
tickingFuturePromise($loop, $check)->then(function ($result) use ($deferred) { | |
$deferred->resolve($result); | |
}); | |
}); | |
return $deferred->promise();*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment