From 8e7efaae99ff651a90bfee7c70a61fbca4c306aa Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Sat, 28 Sep 2024 13:28:32 +0200 Subject: [PATCH] ThreadPool is now `adhoc` available. --- lib/std/threads/fixed_pool.c3 | 2 ++ lib/std/threads/pool.c3 | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/std/threads/fixed_pool.c3 b/lib/std/threads/fixed_pool.c3 index 84444a2e5..ad6a98b58 100644 --- a/lib/std/threads/fixed_pool.c3 +++ b/lib/std/threads/fixed_pool.c3 @@ -1,6 +1,8 @@ module std::thread::threadpool @if (env::POSIX || env::WIN32); import std::thread; +// Please do not use this one in production. + fault ThreadPoolResult { QUEUE_FULL diff --git a/lib/std/threads/pool.c3 b/lib/std/threads/pool.c3 index c92f0077b..4844abf0f 100644 --- a/lib/std/threads/pool.c3 +++ b/lib/std/threads/pool.c3 @@ -1,7 +1,7 @@ module std::thread::pool(); import std::thread; -struct ThreadPool +struct ThreadPool @adhoc { Mutex mu; QueueItem[SIZE] queue;