Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEncodedToken ¶ added in v0.6.0
Types ¶
type WorkerScheduler ¶
type WorkerScheduler struct {
// contains filtered or unexported fields
}
func NewWorkerScheduler ¶
func NewWorkerScheduler(workerNum int, maxWorkEverySeconds int, ctx context.Context) (*WorkerScheduler, error)
NewWorkerScheduler 创建一个并行执行的调度器,控制最大运行数和每秒最大运行数量 NewWorkerScheduler Create a parallel scheduler to control the maximum number of runs and the maximum number of runs per second 注意: task执行是无序的 Warning: task execution is out of order
func (WorkerScheduler) Release ¶
func (s WorkerScheduler) Release()
func (WorkerScheduler) Submit ¶
func (s WorkerScheduler) Submit(task func() error) error
func (WorkerScheduler) WaitUntilFinish ¶
func (s WorkerScheduler) WaitUntilFinish()
Click to show internal directories.
Click to hide internal directories.