Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force all handlers to run in a future turn #20

Merged
merged 2 commits into from
Jul 13, 2019
Merged

Conversation

michaelfig
Copy link
Member

fixes #19

This patch also contains the explicit understanding that unfulfilledHandlers are run against the handled promise, whereas fulfilledHandlers (and the forwardingHandler) are run against the naked object.

Since these are different cases, they have different paths and ensure that both handlers are run in exactly the next turn.

@michaelfig michaelfig requested a review from erights July 13, 2019 18:22
Copy link
Member

@erights erights left a comment

Choose a reason for hiding this comment

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

LGTM

src/index.js Outdated Show resolved Hide resolved
@michaelfig michaelfig merged commit 4672b0e into master Jul 13, 2019
@michaelfig michaelfig deleted the 19-async-handlers branch July 13, 2019 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handler invoked synchronously. Does not protect against reentrancy.
2 participants