Files
query-orchestration/vendor/github.com/alitto/pond/v2/future.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

22 lines
688 B
Go

package pond
// Task represents a task that can be waited on. If the task fails, the error can be retrieved.
type Task interface {
// Done returns a channel that is closed when the task is complete or has failed.
Done() <-chan struct{}
// Wait waits for the task to complete and returns any error that occurred.
Wait() error
}
// TaskGroup represents a task that yields a result. If the task fails, the error can be retrieved.
type Result[R any] interface {
// Done returns a channel that is closed when the task is complete or has failed.
Done() <-chan struct{}
// Wait waits for the task to complete and returns the result and any error that occurred.
Wait() (R, error)
}