AgsConcurrentTree

AgsConcurrentTree — thread-safe locking of tree

Functions

Object Hierarchy

    GInterface
    ╰── AgsConcurrentTree

Known Implementations

AgsConcurrentTree is implemented by AgsDevout and AgsRecycling.

Includes

#include <ags/object/ags_concurrent_tree.h>

Description

The AgsConcurrentTree interface provides essential locks to process tree with parallelism.

Functions

ags_concurrent_tree_set_parent_locked ()

void
ags_concurrent_tree_set_parent_locked (AgsConcurrentTree *concurrent_tree,
                                       gboolean parent_locked);

Set context owns parent lock

Parameters

concurrent_tree

an AgsConcurrent_Tree

 

parent_locked

TRUE means the parent is locked

 

Since: 0.7.4


ags_concurrent_tree_get_parent_locked ()

gboolean
ags_concurrent_tree_get_parent_locked (AgsConcurrentTree *concurrent_tree);

If context owns parent lock

Parameters

concurrent_tree

an AgsConcurrent_Tree

 

Returns

the TRUE if parent locked, else FALSE

Since: 0.7.4


ags_concurrent_tree_get_lock ()

pthread_mutex_t *
ags_concurrent_tree_get_lock (AgsConcurrentTree *concurrent_tree);

Get tree node's lock.

Parameters

concurrent_tree

an AgsConcurrent_Tree

 

Returns

the pthread_mutex_t

Since: 0.6


ags_concurrent_tree_get_parent_lock ()

pthread_mutex_t *
ags_concurrent_tree_get_parent_lock (AgsConcurrentTree *concurrent_tree);

Get tree node's parent lock.

Parameters

concurrent_tree

an AgsConcurrent_Tree

 

Returns

the pthread_mutex_t

Since: 0.6


ags_concurrent_tree_lock_context ()

gboolean
ags_concurrent_tree_lock_context (AgsConcurrentTree *concurrent_tree);

Locks the context of concurrent_tree and blocks until success.

Parameters

concurrent_tree

the AgsConcurrentTree

 

Returns

TRUE if parent locked

Since: 0.6.0


ags_concurrent_tree_unlock_context ()

void
ags_concurrent_tree_unlock_context (AgsConcurrentTree *concurrent_tree);

Unlocks the context of concurrent_tree .

Parameters

concurrent_tree

the AgsConcurrentTree

 

Since: 0.6.0

Types and Values