Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tasker ¶
type Tasker struct {
// contains filtered or unexported fields
}
Tasker is a small helper utility that makes it easy to move tasks to a different goroutine. This is useful when some work must be executed from a specific goroutine / OS thread.
func (*Tasker) Do ¶
func (t *Tasker) Do(f func())
Do runs the given function in the goroutine where ExecuteTasks is called. Do blocks until the given function has completed.
func (*Tasker) ExecuteTasks ¶
func (t *Tasker) ExecuteTasks()
ExecuteTasks executes any pending tasks, then returns.
Click to show internal directories.
Click to hide internal directories.