Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var StackTaskPool = sync.Pool{ New: func() any { return newTaskStack() }, }
StackTaskPool is initialized for memory saving by reusing taskStack.
Functions ¶
This section is empty.
Types ¶
type Scheduler ¶
type Scheduler interface {
ExecuteTasks()
}
Scheduler is a scheduling interface defined for serializing(single thread)/concurrent(multi thread) running.
type SchedulerContext ¶
type SchedulerContext interface {
// contains filtered or unexported methods
}
SchedulerContext is defined for scheduling logic calling, also facilitate interface-oriented coding and testing.
type SimpleTaskScheduler ¶
type SimpleTaskScheduler struct { Err error SchedulerCtx SchedulerContext }
SimpleTaskScheduler is defined for serializing scheduling of memo tasks.
func (*SimpleTaskScheduler) ExecuteTasks ¶
func (s *SimpleTaskScheduler) ExecuteTasks()
ExecuteTasks implements the interface of TaskScheduler.
Click to show internal directories.
Click to hide internal directories.