Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Collect post processes the channel "Results" and calls the ResultProcessorFunc passed in as reference
- // for further processing.
- func (m *Manager) Collect(proc ResultProcessorFunc) {
- for result := range m.results {
- outcome := proc(result)
- fmt.Printf("Job with id: [%d] completed, outcome: %s", result.job.id, outcome)
- }
- m.done <- true
- }
Add Comment
Please, Sign In to add comment