gi-gst-1.0.23: GStreamer bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gst.Objects.TaskPool

Description

This object provides an abstraction for creating threads. The default implementation uses a regular GThreadPool to start tasks.

Subclasses can be made to create custom threads.

Synopsis

Exported types

newtype TaskPool Source #

Memory-managed wrapper type.

Constructors

TaskPool (ManagedPtr TaskPool) 

Instances

Instances details
Eq TaskPool Source # 
Instance details

Defined in GI.Gst.Objects.TaskPool

Methods

(==) :: TaskPool -> TaskPool -> Bool

(/=) :: TaskPool -> TaskPool -> Bool

GObject TaskPool Source # 
Instance details

Defined in GI.Gst.Objects.TaskPool

ManagedPtrNewtype TaskPool Source # 
Instance details

Defined in GI.Gst.Objects.TaskPool

Methods

toManagedPtr :: TaskPool -> ManagedPtr TaskPool

TypedObject TaskPool Source # 
Instance details

Defined in GI.Gst.Objects.TaskPool

Methods

glibType :: IO GType

IsGValue TaskPool Source #

Convert TaskPool to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Gst.Objects.TaskPool

Methods

toGValue :: TaskPool -> IO GValue

fromGValue :: GValue -> IO TaskPool

HasParentTypes TaskPool Source # 
Instance details

Defined in GI.Gst.Objects.TaskPool

type ParentTypes TaskPool Source # 
Instance details

Defined in GI.Gst.Objects.TaskPool

type ParentTypes TaskPool = '[Object, Object]

class (GObject o, IsDescendantOf TaskPool o) => IsTaskPool o Source #

Type class for types which can be safely cast to TaskPool, for instance with toTaskPool.

Instances

Instances details
(GObject o, IsDescendantOf TaskPool o) => IsTaskPool o Source # 
Instance details

Defined in GI.Gst.Objects.TaskPool

toTaskPool :: (MonadIO m, IsTaskPool o) => o -> m TaskPool Source #

Cast to TaskPool, for types for which this is known to be safe. For general casts, use castTo.

Methods

Overloaded methods

cleanup

taskPoolCleanup Source #

Arguments

:: (HasCallStack, MonadIO m, IsTaskPool a) 
=> a

pool: a TaskPool

-> m () 

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

MT safe.

join

taskPoolJoin Source #

Arguments

:: (HasCallStack, MonadIO m, IsTaskPool a) 
=> a

pool: a TaskPool

-> Ptr ()

id: the id

-> m () 

Join a task and/or return it to the pool. id is the id obtained from taskPoolPush.

new

taskPoolNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m TaskPool

Returns: a new TaskPool. objectUnref after usage.

Create a new default task pool. The default task pool will use a regular GThreadPool for threads.

prepare

taskPoolPrepare Source #

Arguments

:: (HasCallStack, MonadIO m, IsTaskPool a) 
=> a

pool: a TaskPool

-> m ()

(Can throw GError)

Prepare the taskpool for accepting taskPoolPush operations.

MT safe.

push

taskPoolPush Source #

Arguments

:: (HasCallStack, MonadIO m, IsTaskPool a) 
=> a

pool: a TaskPool

-> TaskPoolFunction

func: the function to call

-> m (Ptr ())

Returns: a pointer that should be used for the gst_task_pool_join function. This pointer can be Nothing, you must check error to detect errors. (Can throw GError)

Start the execution of a new thread from pool.