486c0a061c05a47b962f9a3ead7083081550a837

There is built in support for asynchronous programming in Hack. You have to declare a function as async with a return value of Awaitable. When you call that function it will return immediately. When you need the return value you call the function join() to force the execution of the async function.

There is not much documentation on the async programming on the hacklang website or around the Internet. I believe the core hack team need to do some more work on this feature before it gets production ready.

On the Happyr developer blog there are two examples of how you can use asynchronous programming. One example uses GenVectorWaitHandle to stack up asynchronous calls and execute them all at once. Read the article here.