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 () |
#define | AGS_IS_WORKER_THREAD() |
#define | AGS_IS_WORKER_THREAD_CLASS() |
#define | AGS_WORKER_THREAD() |
#define | AGS_WORKER_THREAD_CLASS() |
#define | AGS_WORKER_THREAD_GET_CLASS() |
GType | ags_worker_thread_get_type () |
GType | ags_worker_thread_status_flags_get_type () |
#define | AGS_WORKER_THREAD_DEFAULT_JIFFIE |
enum | AgsWorkerThreadStatusFlags |
#define | AGS_TYPE_WORKER_THREAD |
#define | AGS_TYPE_WORKER_THREAD_STATUS_FLAGS |
struct | AgsWorkerThread |
struct | AgsWorkerThreadClass |
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_IS_WORKER_THREAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_WORKER_THREAD))
#define AGS_IS_WORKER_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_WORKER_THREAD))
#define AGS_WORKER_THREAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_WORKER_THREAD, AgsWorkerThread))
#define AGS_WORKER_THREAD_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_WORKER_THREAD, AgsWorkerThreadClass))
#define AGS_WORKER_THREAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_WORKER_THREAD, AgsWorkerThreadClass))
#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.
#define AGS_TYPE_WORKER_THREAD_STATUS_FLAGS (ags_worker_thread_status_flags_get_type())
“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