Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

But you don't need `await` to call an async function, you can use a regular function call in a symc and then the function returns (synchronously) a Promise.

What cannot be done is to perform a blocking call on a Promise from a sync function. And that is by design because JavaScript has a single threaded runtime.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: