MCPcopy Index your code
hub / github.com/goinaction/code / Add

Method Add

chapter7/patterns/runner/runner.go:47–49  ·  view source on GitHub ↗

Add attaches tasks to the Runner. A task is a function that takes an int ID.

(tasks ...func(int))

Source from the content-addressed store, hash-verified

45// Add attaches tasks to the Runner. A task is a function that
46// takes an int ID.
47func (r *Runner) Add(tasks ...func(int)) {
48 r.tasks = append(r.tasks, tasks...)
49}
50
51// Start runs all tasks and monitors channel events.
52func (r *Runner) Start() error {

Callers 15

startFunction · 0.80
shutdownFunction · 0.80
WriteLockMethod · 0.80
mainFunction · 0.80
NewFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected