Gst.SharedTaskPool

g GObject.InitiallyUnowned GObject.InitiallyUnowned Gst.Object Gst.Object GObject.InitiallyUnowned->Gst.Object GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gst.TaskPool Gst.TaskPool Gst.Object->Gst.TaskPool Gst.SharedTaskPool Gst.SharedTaskPool Gst.TaskPool->Gst.SharedTaskPool

Subclasses:

None

Methods

Inherited:

Gst.TaskPool (6), Gst.Object (27), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

get_max_threads ()

set_max_threads (max_threads)

Virtual Methods

Inherited:

Gst.TaskPool (5), Gst.Object (1), GObject.Object (7)

Properties

Inherited:

Gst.Object (2)

Signals

Inherited:

Gst.Object (1), GObject.Object (1)

Fields

Inherited:

Gst.Object (1), GObject.Object (1)

Name

Type

Access

Description

parent

Gst.TaskPool

r

Class Details

class Gst.SharedTaskPool(**kwargs)
Bases:

Gst.TaskPool

Abstract:

No

Structure:

Gst.SharedTaskPoolClass

The Gst.SharedTaskPool object.

New in version 1.20.

classmethod new()[source]
Returns:

a new Gst.SharedTaskPool. Gst.Object.unref() after usage.

Return type:

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 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.

New in version 1.20.

get_max_threads()[source]
Returns:

the maximum number of threads self is configured to spawn

Return type:

int

New in version 1.20.

set_max_threads(max_threads)[source]
Parameters:

max_threads (int) – Maximum number of threads to spawn.

Update the maximal number of threads the self may spawn. When the maximal number of threads is reduced, existing threads are not immediately shut down, see GLib.ThreadPool.set_max_threads().

Setting max_threads to 0 effectively freezes the pool.

New in version 1.20.