ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
thread_pool_entry Struct Reference

Thread handle and shutdown metadata for one pool-owned thread. More...

#include <include/ascii-chat/thread_pool.h>

Data Fields

platform_thread_t thread
 Thread handle.
int stop_id
 Cleanup order (lower = stop first, -1 = unordered).
void *(* thread_func )(void *)
 Thread function.
void * thread_arg
 Thread argument.
char name [64]
 Thread name for debugging.
struct thread_pool_entry * next
 Linked list next pointer.

Detailed Description

Thread handle and shutdown metadata for one pool-owned thread.

Each node holds the native thread handle, its start routine and argument, a diagnostic name, and the stop-order value used when the pool shuts down. Nodes are linked from the pool and are freed with the pool's thread list.

Definition at line 112 of file thread_pool.h.

Field Documentation

◆ name

char thread_pool_entry::name[64]

Thread name for debugging.

Definition at line 117 of file thread_pool.h.

Referenced by thread_pool_create_with_workers(), thread_pool_interrupt_all(), thread_pool_spawn(), and thread_pool_stop_all().

◆ next

struct thread_pool_entry* thread_pool_entry::next

Linked list next pointer.

Definition at line 118 of file thread_pool.h.

Referenced by thread_pool_create_with_workers(), thread_pool_interrupt_all(), thread_pool_spawn(), and thread_pool_stop_all().

◆ stop_id

int thread_pool_entry::stop_id

Cleanup order (lower = stop first, -1 = unordered).

Definition at line 114 of file thread_pool.h.

Referenced by thread_pool_create_with_workers(), thread_pool_spawn(), and thread_pool_stop_all().

◆ thread

platform_thread_t thread_pool_entry::thread

◆ thread_arg

void* thread_pool_entry::thread_arg

Thread argument.

Definition at line 116 of file thread_pool.h.

Referenced by thread_pool_create_with_workers(), and thread_pool_spawn().

◆ thread_func

void *(* thread_pool_entry::thread_func) (void *)

Thread function.

Definition at line 115 of file thread_pool.h.

Referenced by thread_pool_create_with_workers(), and thread_pool_spawn().


The documentation for this struct was generated from the following file: