Documentation ¶ Index ¶ type Task func NewTask[T any](task func() T) *Task[T] func (a *Task[T]) Async() func (a *Task[T]) IsCompleted() bool func (a *Task[T]) IsRunning() bool func (a *Task[T]) Result() *T func (a *Task[T]) Wait() T type WaitGroup func (wg *WaitGroup) Add(task *Task[any]) func (wg *WaitGroup) AddFunc(f func()) func (wg *WaitGroup) Wait() Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Task ¶ type Task[T any] struct { Task func() T // contains filtered or unexported fields } func NewTask ¶ func NewTask[T any](task func() T) *Task[T] func (*Task[T]) Async ¶ func (a *Task[T]) Async() func (*Task[T]) IsCompleted ¶ func (a *Task[T]) IsCompleted() bool func (*Task[T]) IsRunning ¶ func (a *Task[T]) IsRunning() bool func (*Task[T]) Result ¶ func (a *Task[T]) Result() *T func (*Task[T]) Wait ¶ func (a *Task[T]) Wait() T type WaitGroup ¶ type WaitGroup struct { // contains filtered or unexported fields } func (*WaitGroup) Add ¶ func (wg *WaitGroup) Add(task *Task[any]) func (*WaitGroup) AddFunc ¶ func (wg *WaitGroup) AddFunc(f func()) func (*WaitGroup) Wait ¶ func (wg *WaitGroup) Wait() Source Files ¶ View all Source files async.go group.go Click to show internal directories. Click to hide internal directories.