Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WorkerPool ¶
type WorkerPool interface { // Schedule try to acquire pooled worker goroutine to execute the specified task, // this method would block if no worker goroutine is available Schedule(task func()) // Schedule try to acquire pooled worker goroutine to execute the specified task first, // but would not block if no worker goroutine is available. A temp goroutine will be created for task execution. ScheduleAlways(task func()) ScheduleAuto(task func()) }
WorkerPool provides a pool for goroutines
Click to show internal directories.
Click to hide internal directories.