Companion

object Companion : RecordCompanion<ThreadPool, <Error class: unknown class>>

Functions

Link copied to clipboard
fun getMaxIdleTime(): <Error class: unknown class>

This function will return the maximum @interval that a thread will wait in the thread pool for new tasks before being stopped.

Link copied to clipboard

Returns the maximal allowed number of unused threads.

Link copied to clipboard
fun getNumUnusedThreads(): <Error class: unknown class>

Returns the number of currently unused threads.

Link copied to clipboard
fun setMaxIdleTime(interval: <Error class: unknown class>)

This function will set the maximum @interval that a thread waiting in the pool for new tasks can be idle for before being stopped. This function is similar to calling g_thread_pool_stop_unused_threads() on a regular timeout, except this is done on a per thread basis.

Link copied to clipboard
fun setMaxUnusedThreads(maxThreads: Int)

Sets the maximal number of unused threads to @max_threads. If @max_threads is -1, no limit is imposed on the number of unused threads.

Link copied to clipboard

Stops all currently unused threads. This does not change the maximal number of unused threads. This function can be used to regularly stop all unused threads e.g. from g_timeout_add().

Link copied to clipboard
open override fun wrapRecordPointer(pointer: <Error class: unknown class><out <Error class: unknown class>>): ThreadPool

Wrap a CPointer pointing to a record of this type into its wrapper class.