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

Update README.md for async recommendation #75

Merged
merged 2 commits into from
Dec 19, 2017
Merged

Conversation

dcousens
Copy link
Member

No description provided.

@fanatid
Copy link
Contributor

fanatid commented Dec 18, 2017

out of interest, for what nextTick is used?
https://github.com/crypto-browserify/pbkdf2/blob/v3.0.14/lib/async.js#L57-L65

@calvinmetcalf
Copy link
Contributor

so if an error is thrown in a promise callback, the error is swallowed and passed to a .catch function. This is not good when we are making shimming callback based apis with something based on a promise because that means any errors thrown in the callback will be swallowed, so what this does is run the callback in the next tick outside of the promise so the errors don't get swallowed.

@fanatid
Copy link
Contributor

fanatid commented Dec 18, 2017

ah, of course
thanks for explanation @calvinmetcalf

@dcousens dcousens merged commit d7882f1 into master Dec 19, 2017
@dcousens dcousens deleted the dcousens-patch-1 branch December 19, 2017 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants