Hacker Newsnew | past | comments | ask | show | jobs | submit | interroboom's commentslogin

there are third party libraries (bluebird, co, Q, etc) that use generators to yield promises (or lightweight alternatives such as 'thunks'), and then a helper function that handles waiting for those promises/thunks to return and then resuming the generator. annoying that its not baked into ES6, but it means async code can be basically written like sync code (including typical error handling)


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

Search: