SharedTaskPool

The #GstSharedTaskPool object.

Constructors

this
this()

Create a new shared task pool. The shared task pool will queue tasks on a maximum number of threads, 1 by default.

Members

Functions

getMaxThreads
uint getMaxThreads()
setMaxThreads
void setMaxThreads(uint maxThreads)

Update the maximal number of threads the pool may spawn. When the maximal number of threads is reduced, existing threads are not immediately shut down, see glib.thread_pool.ThreadPool.setMaxThreads.

Inherited Members

From TaskPool

cleanup
void cleanup()

Wait for all tasks to be stopped. This is mainly used internally to ensure proper cleanup of internal data structures in test suites.

disposeHandle
void disposeHandle(void* id)

Dispose of the handle returned by gst.task_pool.TaskPool.push. This does not need to be called with the default implementation as the default #GstTaskPoolClass::push implementation always returns null. This does not need to be called either when calling gst.task_pool.TaskPool.join, but should be called when joining is not necessary, but gst.task_pool.TaskPool.push returned a non-null value.

join
void join(void* id)

Join a task and/or return it to the pool. id is the id obtained from gst.task_pool.TaskPool.push. The default implementation does nothing, as the default #GstTaskPoolClass::push implementation always returns null.

prepare
void prepare()

Prepare the taskpool for accepting gst.task_pool.TaskPool.push operations.

push
void* push(gst.types.TaskPoolFunction func)

Start the execution of a new thread from pool.