AgsConcurrencyProvider

AgsConcurrencyProvider — concurrency interface

Functions

Types and Values

Object Hierarchy

    GInterface
    ╰── AgsConcurrencyProvider

Known Implementations

AgsConcurrencyProvider is implemented by AgsServerApplicationContext and AgsThreadApplicationContext.

Includes

#include <ags/thread/ags_concurrency_provider.h>

Description

The AgsConcurrencyProvider gives you unique access to threads.

Functions

ags_concurrency_provider_get_mutex_manager ()

AgsMutexManager *
ags_concurrency_provider_get_mutex_manager
                               (AgsConcurrencyProvider *concurrency_provider);

Get mutex manager of application context.

Parameters

concurrency_provider

the AgsConcurrencyProvider

 

Returns

the assigned AgsMutexManager

Since: 2.0.0


ags_concurrency_provider_get_main_loop ()

AgsThread *
ags_concurrency_provider_get_main_loop
                               (AgsConcurrencyProvider *concurrency_provider);

Get main loop of application context.

Parameters

concurrency_provider

the AgsConcurrencyProvider

 

Returns

the AgsThread implementing AgsMainLoop interface

Since: 2.0.0


ags_concurrency_provider_get_task_thread ()

AgsThread *
ags_concurrency_provider_get_task_thread
                               (AgsConcurrencyProvider *concurrency_provider);

Get task thread of application context.

Parameters

concurrency_provider

the AgsConcurrencyProvider

 

Returns

the AgsThread implementing AgsAsyncQueue interface

Since: 2.0.0


ags_concurrency_provider_get_thread_pool ()

AgsThreadPool *
ags_concurrency_provider_get_thread_pool
                               (AgsConcurrencyProvider *concurrency_provider);

Get thread pool of application context.

Parameters

concurrency_provider

the AgsConcurrencyProvider

 

Returns

the AgsThreadPool

Since: 2.0.0


ags_concurrency_provider_get_worker ()

GList *
ags_concurrency_provider_get_worker (AgsConcurrencyProvider *concurrency_provider);

Get workers of application context.

Parameters

concurrency_provider

the AgsConcurrencyProvider

 

Returns

the GList containing workers

Since: 2.0.0


ags_concurrency_provider_set_worker ()

void
ags_concurrency_provider_set_worker (AgsConcurrencyProvider *concurrency_provider,
                                     GList *worker);

Set workers of application context.

Parameters

concurrency_provider

the AgsConcurrencyProvider

 

worker

the GList containing workers

 

Since: 2.0.0


AGS_CONCURRENCY_PROVIDER()

#define AGS_CONCURRENCY_PROVIDER(obj)                    (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_CONCURRENCY_PROVIDER, AgsConcurrencyProvider))

AGS_CONCURRENCY_PROVIDER_GET_INTERFACE()

#define AGS_CONCURRENCY_PROVIDER_GET_INTERFACE(obj)      (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_CONCURRENCY_PROVIDER, AgsConcurrencyProviderInterface))

AGS_CONCURRENCY_PROVIDER_INTERFACE()

#define AGS_CONCURRENCY_PROVIDER_INTERFACE(vtable)       (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_CONCURRENCY_PROVIDER, AgsConcurrencyProviderInterface))

AGS_IS_CONCURRENCY_PROVIDER()

#define AGS_IS_CONCURRENCY_PROVIDER(obj)                 (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_CONCURRENCY_PROVIDER))

AGS_IS_CONCURRENCY_PROVIDER_INTERFACE()

#define AGS_IS_CONCURRENCY_PROVIDER_INTERFACE(vtable)    (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_CONCURRENCY_PROVIDER))

ags_concurrency_provider_get_type ()

GType
ags_concurrency_provider_get_type ();

Types and Values

AGS_TYPE_CONCURRENCY_PROVIDER

#define AGS_TYPE_CONCURRENCY_PROVIDER                    (ags_concurrency_provider_get_type())

AgsConcurrencyProvider

typedef struct _AgsConcurrencyProvider AgsConcurrencyProvider;

struct AgsConcurrencyProviderInterface

struct AgsConcurrencyProviderInterface {
  GTypeInterface ginterface;

  AgsMutexManager* (*get_mutex_manager)(AgsConcurrencyProvider *concurrency_provider);

  AgsThread* (*get_main_loop)(AgsConcurrencyProvider *concurrency_provider);
  AgsThread* (*get_task_thread)(AgsConcurrencyProvider *concurrency_provider);
  
  AgsThreadPool* (*get_thread_pool)(AgsConcurrencyProvider *concurrency_provider);
  
  GList* (*get_worker)(AgsConcurrencyProvider *concurrency_provider);
  void (*set_worker)(AgsConcurrencyProvider *concurrency_provider,
		     GList *worker);
};