Lely core libraries  2.2.5
thrd_loop.h
Go to the documentation of this file.
1 
36 #ifndef LELY_EV_THRD_LOOP_H_
37 #define LELY_EV_THRD_LOOP_H_
38 
39 #include <lely/ev/ev.h>
40 
41 #include <stddef.h>
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46 
52 
59 void ev_thrd_loop_stop(void);
60 
62 int ev_thrd_loop_stopped(void);
63 
65 void ev_thrd_loop_restart(void);
66 
73 size_t ev_thrd_loop_run(void);
74 
82 size_t ev_thrd_loop_run_one(void);
83 
84 #ifdef __cplusplus
85 }
86 #endif
87 
88 #endif // !LELY_EV_THRD_LOOP_H_
const struct ev_exec_vtbl *const ev_exec_t
An abstract task executor.
Definition: ev.h:29
size_t ev_thrd_loop_run(void)
If the thread-local event loop is not stopped, run all available tasks.
Definition: thrd_loop.c:101
void ev_thrd_loop_restart(void)
Restarts a thread-local event loop.
Definition: thrd_loop.c:95
void ev_thrd_loop_stop(void)
Stops the thread-local event loop.
Definition: thrd_loop.c:83
This is the public header file of the event library.
This header file is part of the C11 and POSIX compatibility library; it includes <stddef.h> and defines any missing functionality.
ev_exec_t * ev_thrd_loop_get_exec(void)
Returns a pointer to the executor corresponding to the thread-local event loop.
Definition: thrd_loop.c:75
int ev_thrd_loop_stopped(void)
Returns 1 if the thread-local event loop is stopped, and 0 if not.
Definition: thrd_loop.c:89
size_t ev_thrd_loop_run_one(void)
If the thread-local event loop is not stopped, executes the first task submitted to it...
Definition: thrd_loop.c:110