3 ms·
Yes, you could do that. It would be very simple to give the same channel to two goroutines. Each goroutine would transmit the solution on the channel. You would
by jgrahamc 14y ago
Yes, you could do that. It would be very simple to give the same channel to two goroutines. Each goroutine would transmit the solution on the channel. You would just wait around to get the first item off the channel.
Toy example: http://play.golang.org/p/imM9nOwer_ http://play.golang.org/p/imM9nOwer_