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

should preserve domain of the callback function #664

Closed
wants to merge 3 commits into from

Conversation

@dimichgh
Copy link

@dimichgh dimichgh commented Jun 19, 2015

currently, due to sharing of the promise, the caller that does the
resolve/reject passes its domain to other callbacks causing unexpected
behavior.

currently, due to sharing of the promise, the caller that does the
resolve/reject passes its domain to other callbacks causing unexpected
behavior.
@benjamingr
Copy link
Collaborator

@benjamingr benjamingr commented Jun 19, 2015

Hehe, Function#bind in bluebird. How would this work with bluebird's .bind for context preservation?

@dimichgh
Copy link
Author

@dimichgh dimichgh commented Jun 19, 2015

It seems process.bind is smart enough to keep Function#bind reference bound.
I have added tests for that.

@petkaantonov
Copy link
Owner

@petkaantonov petkaantonov commented Jul 1, 2015

Can you remove the implementation from the PR and just leave the tests?

A full fix will have to remove all the domain code from async.js and also it needs to be implemented more efficiently.

@dimichgh
Copy link
Author

@dimichgh dimichgh commented Jul 3, 2015

sure, let me edit it out.

letting bluebird team implement optimized solution
petkaantonov added a commit that referenced this pull request Jul 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants