|
ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
|
🧵 Generic thread pool implementation for managing worker threads More...
Go to the source code of this file.
Functions | |
| thread_pool_t * | thread_pool_create (const char *pool_name) |
| void | thread_pool_destroy (thread_pool_t *pool) |
| asciichat_error_t | thread_pool_spawn (thread_pool_t *pool, void *(*thread_func)(void *), void *thread_arg, int stop_id, const char *thread_name) |
| asciichat_error_t | thread_pool_stop_all (thread_pool_t *pool) |
| size_t | thread_pool_get_count (const thread_pool_t *pool) |
| bool | thread_pool_has_threads (const thread_pool_t *pool) |
| asciichat_error_t | thread_pool_interrupt_all (thread_pool_t *pool, int sig) |
🧵 Generic thread pool implementation for managing worker threads
Definition in file thread_pool.c.
| thread_pool_t * thread_pool_create | ( | const char * | pool_name | ) |
Definition at line 17 of file thread_pool.c.
References mutex_init().
Referenced by acds_server_init(), server_main(), and tcp_server_add_client().
| void thread_pool_destroy | ( | thread_pool_t * | pool | ) |
Definition at line 48 of file thread_pool.c.
References mutex_destroy(), and thread_pool_stop_all().
Referenced by acds_server_shutdown(), server_main(), tcp_server_destroy(), and tcp_server_remove_client().
| size_t thread_pool_get_count | ( | const thread_pool_t * | pool | ) |
Definition at line 175 of file thread_pool.c.
Referenced by tcp_server_get_thread_count(), tcp_server_spawn_thread(), and thread_pool_has_threads().
| bool thread_pool_has_threads | ( | const thread_pool_t * | pool | ) |
Definition at line 186 of file thread_pool.c.
References thread_pool_get_count().
| asciichat_error_t thread_pool_interrupt_all | ( | thread_pool_t * | pool, |
| int | sig | ||
| ) |
Definition at line 190 of file thread_pool.c.
| asciichat_error_t thread_pool_spawn | ( | thread_pool_t * | pool, |
| void *(*)(void *) | thread_func, | ||
| void * | thread_arg, | ||
| int | stop_id, | ||
| const char * | thread_name | ||
| ) |
Definition at line 70 of file thread_pool.c.
References asciichat_thread_create().
Referenced by acds_server_init(), audio_start_thread(), capture_start_thread(), keepalive_start_thread(), protocol_start_connection(), server_main(), and tcp_server_spawn_thread().
| asciichat_error_t thread_pool_stop_all | ( | thread_pool_t * | pool | ) |
Definition at line 135 of file thread_pool.c.
References asciichat_thread_join().
Referenced by protocol_stop_connection(), tcp_server_stop_client_threads(), and thread_pool_destroy().