Skip to content

Conversation

zerbina
Copy link
Collaborator

@zerbina zerbina commented Jun 26, 2024

Summary

  • asyncjs no longer uses JavaScript's async
  • result in .async procedures now works like it does everywhere else
  • methods 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 is then chained to a promise object when awaiting

To-Do

  • make imported exceptions properly catchable within closure iterators (separate PR)
  • re-add support for returning Futures 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

@zerbina zerbina added the stdlib Standard library label Jun 26, 2024
Copy link
Collaborator

@saem saem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor doc suggestion

## and Electron.
##
## If you need to use this module with older versions of JavaScript, you can
## use a tool that backports the resulting JavaScript code, as babel.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## use a tool that backports the resulting JavaScript code, as babel.
## use a tool that backports the resulting JavaScript code, such as babel.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it's not strictly part of the change, but it was right there; not a requirement to update it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stdlib Standard library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants