Quantcast
Channel: Go Channels - Pushing to a channel stops execution - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by icza for Go Channels - Pushing to a channel stops execution

Your correctAnswersCh channel is unbuffered, so sending anything on it blocks until there is someone receiving from it. And since your main() function only receives from it after the timeout, your app...

View Article



Go Channels - Pushing to a channel stops execution

I'm trying to create a command line quiz, where users would be asked question after question until they either finish the final question, or they are timed out.I wanted to use channels so I could learn...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images