Created
June 28, 2014 00:06
-
-
Save kawahara/5aa3a45d575a07384af6 to your computer and use it in GitHub Desktop.
hacklang-async
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
<?hh | |
async function hoge() : Awaitable<void> { | |
var_dump('hoge1'); | |
await SleepWaitHandle::create(1000000); | |
var_dump('hoge2'); | |
} | |
async function run(): Awaitable<void> { | |
await GenArrayWaitHandle::create([hoge(), hoge()]); | |
} | |
$await = run(); | |
$await->join(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment