Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Support concurrent blocks in reactive code
Summary: We need to whitelist awaitall as counting as being immediately awaited. Reviewed By: vladima Differential Revision: D13329905 fbshipit-source-id: 292afc3fd7d73544a4f9702b2e7011efc79bd81f
- Loading branch information
Showing
with
24 additions
and 0 deletions.
@@ -0,0 +1,16 @@ | ||
<?hh // strict | ||
|
||
<<__Rx>> | ||
async function genx(): Awaitable<int> { return 42; } | ||
<<__Rx>> | ||
async function geny(): Awaitable<void> {} | ||
|
||
<<__Rx>> | ||
async function foo(): Awaitable<int> { | ||
concurrent { | ||
$x = await genx(); | ||
await geny(); | ||
$y = await genx(); | ||
} | ||
return $x + $y; | ||
} |
@@ -0,0 +1 @@ | ||
No errors |