nimskull
nimskull copied to clipboard
asyncjs: don't use JavaScript `async`
Summary
-
asyncjs
no longer uses JavaScript'sasync
-
result
in.async
procedures now works like it does everywhere else -
method
s can no longer use.async
Details
- the goal is removing the usage of the deprecated
.codegenDecl
pragma - routines marked with the
.async
pragma internally use a closure iterator that isthen
chained to a promise object whenawait
ing
To-Do
- [ ] make imported exceptions properly catchable within closure iterators (separate PR)
- [ ] re-add support for returning
Future
s from.async
procedures - [ ] write a proper commit message
Notes for Reviewers
- prior discussion about this can be found here
- an important prerequisite for the new JavaScript code generator