Documentation
¶
Overview ¶
Package par implements parallel execution helpers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache runs an action once per key and caches the result.
type Work ¶
type Work struct {
// contains filtered or unexported fields
}
Work manages a set of work items to be executed in parallel, at most once each. The items in the set must all be valid map keys.
func (*Work) Do ¶
Do runs f in parallel on items from the work set, with at most n invocations of f running at a time. It returns when everything added to the work set has been processed. At least one item should have been added to the work set before calling Do (or else Do returns immediately), but it is allowed for f(item) to add new items to the set. Do should only be used once on a given Work.
Click to show internal directories.
Click to hide internal directories.