Top |
gboolean | ags_worker_thread_test_status_flags () |
void | ags_worker_thread_set_status_flags () |
void | ags_worker_thread_unset_status_flags () |
void * | ags_woker_thread_do_poll_loop () |
void | ags_worker_thread_do_poll () |
AgsWorkerThread * | ags_worker_thread_new () |
GFlags ╰── AgsWorkerThreadStatusFlags GObject ╰── AgsThread ╰── AgsWorkerThread ╰── AgsDestroyWorker
The AgsWorkerThread does non-realtime work. You might want
to synchronize to the run signal within your ::do_poll()
method.
You usually connect to AgsThread::do_poll()
event. The poll event
is invoked as long as AGS_WORKER_THREAD_STATUS_RUNNING
status flag is set.
You might want to inject to a thread tree using a AgsTask implementation.
gboolean ags_worker_thread_test_status_flags (AgsWorkerThread *worker_thread
,AgsWorkerThreadStatusFlags status_flags
);
Test status_flags
of worker_thread
.
Since: 3.0.0
void ags_worker_thread_set_status_flags (AgsWorkerThread *worker_thread
,AgsWorkerThreadStatusFlags status_flags
);
Set status flags.
Since: 3.0.0
void ags_worker_thread_unset_status_flags (AgsWorkerThread *worker_thread
,AgsWorkerThreadStatusFlags status_flags
);
Unset status flags.
Since: 3.0.0
void *
ags_woker_thread_do_poll_loop (void *ptr
);
Do loop and invoke ags_worker_thread_do_poll()
unless flag
AGS_WORKER_THREAD_RUNNING was unset.
Since: 3.0.0
void
ags_worker_thread_do_poll (AgsWorkerThread *worker_thread
);
Do poll your work. It is called of the worker thread.
Since: 3.0.0
AgsWorkerThread * ags_worker_thread_new ();
Create a new instance of AgsWorkerThread.
Since: 3.0.0
#define AGS_WORKER_THREAD_DEFAULT_JIFFIE (AGS_THREAD_DEFAULT_MAX_PRECISION)
Enum values to control the behavior or indicate internal state of AgsWorkerThread by enable/disable as status flags.
“do-poll”
signalvoid user_function (AgsWorkerThread *thread, gpointer user_data)
The ::do_poll()
signal runs independently of ::run()
but
might be synchronized using a conditional lock.
thread |
the AgsWorkerThread |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 3.0.0