:right-sidebar: True SharedTaskPool =================================================================== .. currentmodule:: gi.repository.Gst .. versionadded:: 1.20 .. class:: SharedTaskPool(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gst.TaskPool`, :class:`~gi.repository.Gst.Object`, :class:`~gi.repository.GObject.InitiallyUnowned`, :class:`~gi.repository.GObject.Object` The :obj:`~gi.repository.Gst.SharedTaskPool` object. Constructors ------------ .. rst-class:: interim-class .. class:: SharedTaskPool :no-index: .. classmethod:: new() -> ~gi.repository.Gst.TaskPool Create a new shared task pool. The shared task pool will queue tasks on a maximum number of threads, 1 by default. Do not use a :obj:`~gi.repository.Gst.SharedTaskPool` to manage potentially inter-dependent tasks such as pad tasks, as having one task waiting on another to return before returning would cause obvious deadlocks if they happen to share the same thread. .. versionadded:: 1.20 Methods ------- .. rst-class:: interim-class .. class:: SharedTaskPool :no-index: .. method:: get_max_threads() -> int .. versionadded:: 1.20 .. method:: set_max_threads(max_threads: int) -> None 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 :func:`~gi.repository.GLib.ThreadPool.set_max_threads`. Setting ``max_threads`` to 0 effectively freezes the pool. .. versionadded:: 1.20 :param max_threads: Maximum number of threads to spawn. Fields ------ .. rst-class:: interim-class .. class:: SharedTaskPool :no-index: .. attribute:: parent .. attribute:: priv