Please read the title, and here is an example:
testChannel := make(chan struct{}, 1)
for {
select {
case testChannel <- struct{}{}:
fmt.Println("Test Channel writen")
<-testChannel
default:
panic("Should never panic?")
}
}
Can I assume that the code above will never panic?
Thank you!
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.