Closed jay11ca39 closed 6 years ago
It's hanging on for {}
. This has nothing to do with zmq. The empty for loop prevents Go to switch between Go routines.
That for{} loop is for blocking for application to exit. BTW When i tested without go routine it worked well. But is it the problem with go routine to switch between main and new thread?
Hi @pebbe , Instead of for{} loop i used channel to block exit of main program it worked well. Thanks for help.
Hello @pebbe
Steps to reproduce the issue:
package main
Build the code :
$ go build sample.go
Run the sample:
$ ./sample
Expected: It should continuously publish the events. Actual: It is hanging after publishing some events.