We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://gist.github.com/qfox/f33a51dc7189d98efe23
Basically, this test:
PubSub.publish('foo', 'bar'); PubSub.subscribe('foo', function(name, value) {});
Currently the callback is not being fired. However, in this case they are both (which is fine).
PubSub.subscribe('foo', function(name, value) {}); PubSub.publish('foo', 'bar'); PubSub.subscribe('foo', function(name, value) {});
Due to the async nature of pubsub I expect it to evaluate target handlers at emitting time, not at call time.
This basically also means this:
var foo = PubSub.subscribe('foo', function(name, value) { throw 'No dont call me!'; }); PubSub.publish('foo', 'bar'); PubSub.unsubscribe(foo);
I expect the subscriber NOT to be called because it was removed before actually emitting the event.
The text was updated successfully, but these errors were encountered:
+1
Sorry, something went wrong.
No branches or pull requests
https://gist.github.com/qfox/f33a51dc7189d98efe23
Basically, this test:
Currently the callback is not being fired. However, in this case they are both (which is fine).
Due to the async nature of pubsub I expect it to evaluate target handlers at emitting time, not at call time.
This basically also means this:
I expect the subscriber NOT to be called because it was removed before actually emitting the event.
The text was updated successfully, but these errors were encountered: