Top |
#define | AGS_TASK_LAUNCHER_GET_OBJ_MUTEX() |
void | ags_task_launcher_attach () |
void | ags_task_launcher_add_task () |
void | ags_task_launcher_add_task_all () |
void | ags_task_launcher_add_cyclic_task () |
void | ags_task_launcher_remove_cyclic_task () |
void | ags_task_launcher_run () |
void | ags_task_launcher_sync_run () |
AgsTaskLauncher * | ags_task_launcher_new () |
The AgsTaskLauncher acts as task launcher. The task launcher provides you a thread-safe context within tree tree.
It might be used to inject work from one thread to another, too.
AgsTaskLauncher::run()
is called from AgsThread::clock()
default
implementation.
There are some threads providing injection via dedicated AgsTaskLauncher.
#define AGS_TASK_LAUNCHER_GET_OBJ_MUTEX(obj) (&(((AgsTaskLauncher *) obj)->obj_mutex))
void ags_task_launcher_attach (AgsTaskLauncher *task_launcher
,GMainContext *main_context
);
Attach task_launcher
to main_context
.
Since: 3.0.0
void ags_task_launcher_add_task (AgsTaskLauncher *task_launcher
,AgsTask *task
);
Add task
to task_launcher
.
Since: 3.0.0
void ags_task_launcher_add_task_all (AgsTaskLauncher *task_launcher
,GList *list
);
Add all list
to task_launcher
.
task_launcher |
the AgsTaskLauncher |
|
list |
the GList containing AgsTask. |
[element-type Ags.Task][transfer none] |
Since: 3.0.0
void ags_task_launcher_add_cyclic_task (AgsTaskLauncher *task_launcher
,AgsTask *cyclic_task
);
Add cyclic_task
to task_launcher
.
Since: 3.0.0
void ags_task_launcher_remove_cyclic_task (AgsTaskLauncher *task_launcher
,AgsTask *cyclic_task
);
Remove cyclic_task
from task_launcher
.
Since: 3.0.0
void
ags_task_launcher_run (AgsTaskLauncher *task_launcher
);
Run tasks.
Since: 3.0.0
void
ags_task_launcher_sync_run (AgsTaskLauncher *task_launcher
);
Sync run tasks.
Since: 3.0.0
AgsTaskLauncher * ags_task_launcher_new ();
Create a new AgsTaskLauncher.
Since: 3.0.0
“cyclic-task”
property “cyclic-task” gpointer
The assigned cyclic AgsTask to launch.
[transfer full]
Owner: AgsTaskLauncher
Flags: Read / Write
Since: 3.0.0
“task”
property “task” gpointer
The assigned AgsTask to launch.
[transfer full]
Owner: AgsTaskLauncher
Flags: Read / Write
Since: 3.0.0
“run”
signalvoid user_function (AgsTaskLauncher *task_launcher, gpointer user_data)
The ::run signal is invoked to run “task”
task_launcher |
the AgsTaskLauncher |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 3.0.0