A library would be overkill.
I like to allocate a Ticket for each job. This is for tracking details.
type Ticket struct {
Results []byte // whatever output is appropriate
}
tkts := make([]*Ticket, numJobs)
// pseudo code:
// assign the tickets in sequential order. Track in tkts.
// Run all the jobs.
// Then loop through the tkts in order again to print the output.
If you like you can add a Done chan struct{} to the Ticket to have
something to wait on.
--
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.