Files
query-orchestration/vendor/github.com/alitto/pond/v2/default.go
T
Michael McGuinness 752fb2e2c0 Merged in feature/chc_1 (pull request #120)
Text Extraction Clean Up + Parallelization

* merged_Call

* directchildren

* bitofimprovements

* go

* parallel

* fixfullsuite

* pondforconcurrency

* comments

* muchdone

* bitsofclean

* stabilisedtests

* snappy

* threadpooltests

* childelements

* testspassed
2025-04-25 17:02:50 +00:00

25 lines
779 B
Go

package pond
// defaultPool is the default pool used by the package-level functions.
var defaultPool = newPool(0, nil)
// Submit submits a task to the default pool and returns a future that can be used to wait for the task to complete.
func Submit(task func()) Task {
return defaultPool.Submit(task)
}
// SubmitErr submits a task to the default pool and returns a future that can be used to wait for the task to complete.
func SubmitErr(task func() error) Task {
return defaultPool.SubmitErr(task)
}
// NewGroup creates a new task group with the default pool.
func NewGroup() TaskGroup {
return defaultPool.NewGroup()
}
// NewSubpool creates a new subpool with the default pool.
func NewSubpool(maxConcurrency int) Pool {
return defaultPool.NewSubpool(maxConcurrency)
}