From cd06123bd5bf269c2ee3143d02fc696d82cbfdef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20Baz=20Castillo?= Date: Mon, 12 Aug 2024 12:33:24 +0200 Subject: [PATCH] real fix --- worker/include/DepLibUring.hpp | 2 +- worker/src/DepLibUring.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/worker/include/DepLibUring.hpp b/worker/include/DepLibUring.hpp index a0b041c899..c41f308eed 100644 --- a/worker/include/DepLibUring.hpp +++ b/worker/include/DepLibUring.hpp @@ -52,7 +52,7 @@ class DepLibUring class LibUring; // Whether liburing is enabled or not after runtime checks. - static bool enabled; + thread_local static bool enabled; thread_local static LibUring* liburing; public: diff --git a/worker/src/DepLibUring.cpp b/worker/src/DepLibUring.cpp index 8ad9bc8555..0195ce7b9e 100644 --- a/worker/src/DepLibUring.cpp +++ b/worker/src/DepLibUring.cpp @@ -11,7 +11,7 @@ #include /* Static variables. */ -bool DepLibUring::enabled{ false }; +thread_local bool DepLibUring::enabled{ false }; // liburing instance per thread. thread_local DepLibUring::LibUring* DepLibUring::liburing{ nullptr }; // Completion queue entry array used to retrieve processes tasks.