AgsTask

AgsTask — Perform operations in a thread safe context.

Synopsis

#include <ags/audio/ags_task.h>

struct              AgsTask;
struct              AgsTaskClass;
enum                AgsTaskFlags;
void                ags_task_failure                    (AgsTask *task,
                                                         GError *error);
void                ags_task_launch                     (AgsTask *task);
AgsTask *           ags_task_new                        ();

Description

AgsTask object acts an interceptor in a thread safe context.

Details

struct AgsTask

struct AgsTask {
  GObject object;

  guint flags;

  char *name;

  guint delay;

  pthread_cond_t wait_sync_task_cond;
};

struct AgsTaskClass

struct AgsTaskClass {
  GObjectClass object;

  void (*launch)(AgsTask *task);

  void (*failure)(AgsTask *task, GError *error);
};

enum AgsTaskFlags

typedef enum {
  AGS_TASK_LOCKED = 1,
} AgsTaskFlags;

ags_task_failure ()

void                ags_task_failure                    (AgsTask *task,
                                                         GError *error);

Signals failure of task.

task :

an AgsTask

error :

is NULL on success

Since 0.4


ags_task_launch ()

void                ags_task_launch                     (AgsTask *task);

Intercept task.

task :

an AgsTask

Since 0.4


ags_task_new ()

AgsTask *           ags_task_new                        ();

Creates a AgsTask

Returns :

a new AgsTask

Since 0.4