3 ms·
Context would be passed to each go-routines for cancellation but the pattern would be the same as OP's suggestion. I'd say a set of go-routines and a sync.WaitG
by owaislone 7y ago
Context would be passed to each go-routines for cancellation but the pattern would be the same as OP's suggestion. I'd say a set of go-routines and a sync.WaitGroup would probably be a better pattern for this use case. Routines + select is more useful for listening on incoming data than concurrently sending out bytes.