Documentation ¶
Index ¶
Constants ¶
View Source
const ( StateCreated State = "Created" StateRunning = "Running" StateFinished = "Finished" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Task ¶
type Task[T any] struct { State State Result *T Error error // contains filtered or unexported fields }
func (*Task[T]) IsCompleted ¶
type TaskCompletionSource ¶
type TaskCompletionSource[T any] struct { IsDone bool Value *T // contains filtered or unexported fields }
func NewTaskCompetitionSource ¶
func NewTaskCompetitionSource[T any]() *TaskCompletionSource[T]
func (*TaskCompletionSource[T]) Await ¶
func (tcs *TaskCompletionSource[T]) Await() error
func (*TaskCompletionSource[T]) Complete ¶
func (tcs *TaskCompletionSource[T]) Complete(value *T)
func (*TaskCompletionSource[T]) IsCompleted ¶
func (tcs *TaskCompletionSource[T]) IsCompleted() bool
Click to show internal directories.
Click to hide internal directories.