Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fan ¶
type Fan[T any] struct { // contains filtered or unexported fields }
Fan is a fan-out channel.
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
Scheduler is a runs a set of functions in the given an single runner function.
That is useful for running a set of functions in a single goroutine, linked to the main loop.
func NewScheduler ¶
func NewScheduler(runner func(f func())) (s *Scheduler)
NewScheduler creates a new Scheduler.
func (*Scheduler) MustRun ¶
func (s *Scheduler) MustRun(f func())
MustRun runs a function in the scheduler, that is guaranteed to run and duplication may happen if misused.
Click to show internal directories.
Click to hide internal directories.