Guest User

Untitled

a guest
Jul 18th, 2018
629
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. // Collect post processes the channel "Results" and calls the ResultProcessorFunc passed in as reference
  2. // for further processing.
  3. func (m *Manager) Collect(proc ResultProcessorFunc) {
  4. for result := range m.results {
  5. outcome := proc(result)
  6. fmt.Printf("Job with id: [%d] completed, outcome: %s", result.job.id, outcome)
  7. }
  8. m.done <- true
  9. }
Add Comment
Please, Sign In to add comment