MCPcopy Create free account
hub / github.com/goinaction/code / New

Function New

chapter7/patterns/runner/runner.go:37–43  ·  view source on GitHub ↗

New returns a new ready-to-use Runner.

(d time.Duration)

Source from the content-addressed store, hash-verified

35
36// New returns a new ready-to-use Runner.
37func New(d time.Duration) *Runner {
38 return &Runner{
39 interrupt: make(chan os.Signal, 1),
40 complete: make(chan error),
41 timeout: time.After(d),
42 }
43}
44
45// Add attaches tasks to the Runner. A task is a function that
46// takes an int ID.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected