independent goroutines. They're all long-lived, discovering stuff about the
world, and occasionally one or more of them will discover things that the
others all want to know. Setting a global boolean to true is an obvious
solution, but I'd like to make my little goroutines easily testable, with
all their input coming from their parameters and no peeking at outside
It seems like I need to pass each goroutine two channels: one on which
it'll be notified of events, and one on which it can send to notify the
world about what it's found. I'll need a goroutine whose job is to listen
for events on the latter, and broadcast them to the former.
Is there a cleaner, better, more idiomatic way to do this?
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@example.com.
For more options, visit https://groups.google.com/groups/opt_out.