asaskevich/EventBus — pull request #2 by bennAH (2014-12-21 01:31:27+00:00)
Title: added publish async

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");