Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ned14/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiall Douglas <s_github@nedprod.com>2022-09-06 18:20:13 +0300
committerGitHub <noreply@github.com>2022-09-06 18:20:13 +0300
commit07488e12722dc35c697acd47e5bc5cf5bdada1c5 (patch)
tree89a6a79dcd5e358946e1bdb42e16915fc633c3f7
parent9ae8d8729d7edc08b3f96386d2f65379ed080d70 (diff)
parent4d0684c6bf4c5d00a2e8ce057fa9bd442ec70f8e (diff)
Merge pull request #100 from BurningEnlightenment/dev/fix-macos-gcd-selection
Enable GCD on non-Linux POSIX if not configured
-rw-r--r--include/llfio/v2.0/detail/impl/dynamic_thread_pool_group.ipp4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llfio/v2.0/detail/impl/dynamic_thread_pool_group.ipp b/include/llfio/v2.0/detail/impl/dynamic_thread_pool_group.ipp
index 71a5096c..e30d8f8b 100644
--- a/include/llfio/v2.0/detail/impl/dynamic_thread_pool_group.ipp
+++ b/include/llfio/v2.0/detail/impl/dynamic_thread_pool_group.ipp
@@ -49,6 +49,10 @@ Distributed under the Boost Software License, Version 1.0.
#include <condition_variable>
#include <thread>
#elif __has_include(<dispatch/dispatch.h>)
+// enable GCD on non-Linux if available but not configured
+#ifndef LLFIO_DYNAMIC_THREAD_POOL_GROUP_USING_GCD
+#define LLFIO_DYNAMIC_THREAD_POOL_GROUP_USING_GCD 1
+#endif
#include <dispatch/dispatch.h>
#else
#error dynamic_thread_pool_group requires Grand Central Dispatch (libdispatch) on non-Linux POSIX.