4 ms·
Instead of? for { select { case <-finish: done <- true return case msg <- msg_out: // write handling case <-pubsub: /
by tankenmate 9y ago
Instead of?
for {
select {
case <-finish:
done <- true
return
case msg <- msg_out:
// write handling
case <-pubsub:
// handle oob controls
default:
// read handling
}
}
- Thetawaves 9y agoYou wont be able to write messages while blocked on the read in this scenario.