AgsConcurrencyProvider

AgsConcurrencyProvider — Concurrency provider interface

Stability Level

Stable, unless otherwise indicated

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

[transfer full]

Since: 3.0.0


ags_concurrency_provider_set_main_loop ()

void
ags_concurrency_provider_set_main_loop
                               (AgsConcurrencyProvider *concurrency_provider,
                                AgsThread *main_loop);

Set main loop of application context.

Parameters

concurrency_provider

the AgsConcurrencyProvider

 

main_loop

the AgsThread implementing AgsMainLoop

 

Since: 3.0.0


ags_concurrency_provider_get_task_launcher ()

AgsTaskLauncher *
ags_concurrency_provider_get_task_launcher
                               (AgsConcurrencyProvider *concurrency_provider);

Get task launcher of application context.

Parameters

concurrency_provider

the AgsConcurrencyProvider

 

Returns

the AgsTaskLauncher.

[transfer full]

Since: 3.0.0


ags_concurrency_provider_set_task_launcher ()

void
ags_concurrency_provider_set_task_launcher
                               (AgsConcurrencyProvider *concurrency_provider,
                                AgsTaskLauncher *task_launcher);

Set task launcher of application context.

Parameters

concurrency_provider

the AgsConcurrencyProvider

 

task_launcher

the AgsTaskLauncher

 

Since: 3.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.

[transfer full]

Since: 3.0.0


ags_concurrency_provider_set_thread_pool ()

void
ags_concurrency_provider_set_thread_pool
                               (AgsConcurrencyProvider *concurrency_provider,
                                AgsThreadPool *thread_pool);

Set thread pool of application context.

Parameters

concurrency_provider

the AgsConcurrencyProvider

 

thread_pool

the AgsThreadPool

 

Since: 3.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.

[element-type Ags.WorkerThread][transfer full]

Since: 3.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.

[element-type Ags.WorkerThread]

Since: 3.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;

  AgsThread* (*get_main_loop)(AgsConcurrencyProvider *concurrency_provider);
  void (*set_main_loop)(AgsConcurrencyProvider *concurrency_provider,
			AgsThread *main_loop);

  AgsTaskLauncher* (*get_task_launcher)(AgsConcurrencyProvider *concurrency_provider);
  void (*set_task_launcher)(AgsConcurrencyProvider *concurrency_provider,
			    AgsTaskLauncher *task_launcher);

  AgsThreadPool* (*get_thread_pool)(AgsConcurrencyProvider *concurrency_provider);
  void (*set_thread_pool)(AgsConcurrencyProvider *concurrency_provider,
			  AgsThreadPool *thread_pool);

  GList* (*get_worker)(AgsConcurrencyProvider *concurrency_provider);
  void (*set_worker)(AgsConcurrencyProvider *concurrency_provider,
		     GList *worker);
};