Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AlreadyCompleted = errors.New("Already completed")
View Source
var AlreadyRunning = errors.New("Already running")
Functions ¶
This section is empty.
Types ¶
type CompletionSource ¶
type CompletionSource struct {
// contains filtered or unexported fields
}
func NewCompletionSource ¶
func NewCompletionSource() *CompletionSource
func (*CompletionSource) SetError ¶
func (s *CompletionSource) SetError(err error) error
func (*CompletionSource) SetResult ¶
func (s *CompletionSource) SetResult(result interface{}) error
func (*CompletionSource) Task ¶
func (s *CompletionSource) Task() *Task
func (*CompletionSource) TrySetError ¶
func (s *CompletionSource) TrySetError(err error) bool
func (*CompletionSource) TrySetResult ¶
func (s *CompletionSource) TrySetResult(result interface{}) bool
type ContinueWithCallback ¶
type Task ¶
type Task struct {
// contains filtered or unexported fields
}
func New ¶
func New(cb TaskCallback) *Task
func NewStarted ¶
func NewStarted(cb TaskCallback) *Task
func (*Task) ContinueWith ¶
func (t *Task) ContinueWith(cb ContinueWithCallback) *Task
func (*Task) IsCompleted ¶
type TaskCallback ¶
type TaskCallback func() (interface{}, error)
Click to show internal directories.
Click to hide internal directories.