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

added publish async #2

Merged
merged 1 commit into from
Dec 21, 2014
Merged

added publish async #2

merged 1 commit into from
Dec 21, 2014

Conversation

bennAH
Copy link
Contributor

@bennAH bennAH commented Dec 21, 2014

func slowCalculator(a, b int) {
time.Sleep(3 * time.Second)
fmt.Printf("%d\n", a + b)
}

bus.Subscribe("main:slow_calculator", slowCalculator);
bus.PublishAsync("main:slow_calculator", 30, 70);
fmt.Println("waiting for result")

bus.WaitAsync();

bus.Unsubscribe("main:slow_calculator");

@asaskevich
Copy link
Owner

Better to document new functions and add them to README.md. In any case, great, thanks! 👍

asaskevich added a commit that referenced this pull request Dec 21, 2014
@asaskevich asaskevich merged commit 14eda73 into asaskevich:master Dec 21, 2014
@bennAH
Copy link
Contributor Author

bennAH commented Dec 21, 2014

Thanks. I will document it in the read me and send a pull request when I get a chance.

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.

None yet

2 participants