From 47a27b0fd6eb0831a74479883ba0b4c30d226fbe Mon Sep 17 00:00:00 2001 From: nodist Date: Mon, 15 Jun 2026 15:23:58 -0400 Subject: memory slab as well as pooling --- docs/application/thread.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docs/application/thread.md') diff --git a/docs/application/thread.md b/docs/application/thread.md index 06410e6..231b0fe 100644 --- a/docs/application/thread.md +++ b/docs/application/thread.md @@ -78,6 +78,7 @@ iterator : arguments, locals, iterator functions, iterator function index # Example ```c +// gcc -std=gnu99 -Wall -Wextra -O2 -fhardened -fno-omit-frame-pointer -o thread_queue thread_queue.c #define _GNU_SOURCE #include #include @@ -311,7 +312,7 @@ void *task_loop(void *arg) { void task_run() { for (int32_t thread_id = 1; thread_id < avaiable_threads; thread_id++) pthread_create(&threads[thread_id].thread, NULL, task_loop, (void*) (intptr_t) thread_id); - task_loop(0); + task_loop(MAIN_THREAD); for (int32_t thread_id = 1; thread_id < avaiable_threads; thread_id++) pthread_join(threads[thread_id].thread, NULL); } -- cgit v1.2.3