ThreadPool
Object Hierarchy:
Description:
[ Compact ]
public class ThreadPool<T>
The ThreadPool struct represents a thread pool.
It has three public read-only members, but the underlying struct is bigger, so you must not copy this struct.
Content:
Static methods:
- public static void free (owned ThreadPool? pool, bool immediate, bool wait)
- public static void set_max_unused_threads (int max_threads)
Sets the maximal number of unused threads to max_threads
.
- public static int get_max_unused_threads ()
Returns the maximal allowed number of unused threads.
- public static uint get_num_unused_threads ()
Returns the number of currently unused threads.
- public static void stop_unused_threads ()
Stops all currently unused threads.
- public static void set_max_idle_time (uint interval)
This function will set the maximum interval
that a thread
waiting in the pool for new tasks can be idle for before being stopped.
- public static uint get_max_idle_time ()
This function will return the maximum interval
that a
thread will wait in the thread pool for new tasks before being stopped.
Creation methods:
Methods: