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
Every subscriber, subscribed in the same "call stack" as published message, will be called. Although subscription took place after publish.
var ps = require("pubsub-js"); ps.subscribe("x", () => {console.log("x0")}); ps.publish("x"); ps.subscribe("x", () => {console.log("x1")}); // x0 // x1
This behaviour won't take place if there isn't any subscriber for the same topic already:
var ps = require("pubsub-js"); ps.publish("x"); ps.subscribe("x", () => {console.log("x1")});
or subscriptions "after publish" will be executed in timeout
var ps = require("pubsub-js"); ps.subscribe("x", () => {console.log("x0")}); ps.publish("x"); setTimeout(() => { ps.subscribe("x", () => {console.log("x1")}) }, 0);
The problem could be solved by checking subscribers to call (during publish) not after timeout, but before.
The text was updated successfully, but these errors were encountered:
This appears to have some overlap with this older issue: #59
Sorry, something went wrong.
Yep, this is the same thing.
No branches or pull requests
Every subscriber, subscribed in the same "call stack" as published message, will be called. Although subscription took place after publish.
This behaviour won't take place if there isn't any subscriber for the same topic already:
or subscriptions "after publish" will be executed in timeout
The problem could be solved by checking subscribers to call (during publish) not after timeout, but before.
The text was updated successfully, but these errors were encountered: