AgsAsyncQueue

AgsAsyncQueue — asynchronous run

Functions

Object Hierarchy

    GInterface
    ╰── AgsAsyncQueue

Known Implementations

AgsAsyncQueue is implemented by AgsTaskThread.

Includes

#include <ags/object/ags_async_queue.h>

Description

The AgsAsyncQueue interface determines if it is safe to run.

Functions

ags_async_queue_increment_wait_ref ()

void
ags_async_queue_increment_wait_ref (AgsAsyncQueue *async_queue);

Increments wait ref.

Parameters

async_queue

the AgsAsyncQueue

 

Since: 0.7.13


ags_async_queue_get_wait_ref ()

guint
ags_async_queue_get_wait_ref (AgsAsyncQueue *async_queue);

Get wait ref.

Parameters

async_queue

the AgsAsyncQueue

 

Returns

The number of threads waiting.

Since: 0.7.13


ags_async_queue_set_run_mutex ()

void
ags_async_queue_set_run_mutex (AgsAsyncQueue *async_queue,
                               pthread_mutex_t *run_mutex);

Sets the mutex to access the condition variable.

Parameters

async_queue

the AgsAsyncQueue

 

run_mutex

a pthread_mutex_t

 

Since: 0.7.0


ags_async_queue_get_run_mutex ()

pthread_mutex_t *
ags_async_queue_get_run_mutex (AgsAsyncQueue *async_queue);

Get the mutex to access the condition variable.

Parameters

async_queue

the AgsAsyncQueue

 

Returns

a pthread_mutex_t

Since: 0.7.0


ags_async_queue_set_run_cond ()

void
ags_async_queue_set_run_cond (AgsAsyncQueue *async_queue,
                              pthread_cond_t *run_cond);

Sets the condition to determine if async_queue was run.

Parameters

async_queue

the AgsAsyncQueue

 

run_cond

a pthread_cond_t

 

Since: 0.7.0


ags_async_queue_get_run_cond ()

pthread_cond_t *
ags_async_queue_get_run_cond (AgsAsyncQueue *async_queue);

Get the condition to wait for async_queue .

Parameters

async_queue

the AgsAsyncQueue

 

Returns

the pthread_cond_t

Since: 0.7.0


ags_async_queue_set_run ()

void
ags_async_queue_set_run (AgsAsyncQueue *async_queue,
                         gboolean is_run);

Determine if you are allowed to pass the condition.

Parameters

async_queue

the AgsAsyncQueue

 

is_run

if TRUE the queue was already running

 

Since: 0.7.0


ags_async_queue_is_run ()

gboolean
ags_async_queue_is_run (AgsAsyncQueue *async_queue);

Decide if you are allowed to pass the condition.

Parameters

async_queue

the AgsAsyncQueue

 

Returns

if TRUE it is safe to continue, else you should wait for the condition.

Since: 0.7.0

Types and Values