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

Not really (at least not the kind of stuff I mentioned), those functions can just return promises which the caller yields: http://codepen.io/anon/pen/WvzGLa

Granted async/await syntax will make this a bit nicer:

    async function funcA() {
      await sleep(1000);
      // ...


But then the called functions have to be written async style.




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

Search: