Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ThreadPool ¶
type ThreadPool interface { Submit(f Functor) // Priority: higher value == higher priority SubmitPriority(f Functor, priority int) // /!\ Does not block, after stopped, use Wait() to wait for all running process to end // Wait for all task to be executed Stop() // /!\ Does not block, after stopped, use Wait() to wait for all running process to end // Does not wait for all task to be executed ForceStop() // Wait for all processes to complete Wait() }
func NewThreadPool ¶
func NewThreadPool(config ThreadPoolConfig) ThreadPool
n: maximum number of parellel executions
type ThreadPoolConfig ¶
Click to show internal directories.
Click to hide internal directories.