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 ( func()) Task {
	return defaultPool.Submit()
}

// SubmitErr submits a task to the default pool and returns a future that can be used to wait for the task to complete.
func ( func() error) Task {
	return defaultPool.SubmitErr()
}

// NewGroup creates a new task group with the default pool.
func () TaskGroup {
	return defaultPool.NewGroup()
}

// NewSubpool creates a new subpool with the default pool.
func ( int) Pool {
	return defaultPool.NewSubpool()
}