package para
import "github.com/gohugoio/hugo/common/para"
Package para implements parallel execution helpers.
Index ¶
Types ¶
type Runner ¶
Runner wraps the lifecycle methods of a new task set.
Run will block until a worker is available or the context is cancelled, and then run the given func in a new goroutine. Wait will wait for all the running goroutines to finish.
type Workers ¶
type Workers struct {
// contains filtered or unexported fields
}
Workers configures a task executor with the most number of tasks to be executed in parallel.
func New ¶
New creates a new Workers with the given number of workers.
func (*Workers) Start ¶
Start starts a new Runner.
Source Files ¶
- Version
- v0.144.2 (latest)
- Published
- Feb 19, 2025
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 13 hours ago –
Tools for package owners.