summary refs log tree commit diff
path: root/src/Compute
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2024-02-15 11:18:17 +0100
committerMel <einebeere@gmail.com>2024-02-15 11:18:17 +0100
commit0a5e412541937ead88377cabdb565ecfe65c0afc (patch)
treecf2daa159cf466ab50d639bdb209e8603e763138 /src/Compute
parent6a30c3e4f22de4d0f8f32107f614f597f5f39cc1 (diff)
downloadmeowcraft-0a5e412541937ead88377cabdb565ecfe65c0afc.tar.zst
meowcraft-0a5e412541937ead88377cabdb565ecfe65c0afc.zip
Give all threads specific thread roles and assert thread safety
Diffstat (limited to 'src/Compute')
-rw-r--r--src/Compute/Queue.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Compute/Queue.hpp b/src/Compute/Queue.hpp
index 799df73..3c4ec08 100644
--- a/src/Compute/Queue.hpp
+++ b/src/Compute/Queue.hpp
@@ -1,6 +1,7 @@
 #pragma once
 
 #include "../Common/Sizes.hpp"
+#include "../ThreadRole.hpp"
 #include <functional>
 #include <mutex>
 #include <vector>
@@ -107,6 +108,8 @@ private:
     [[noreturn]] static void run_thread(std::shared_ptr<Control> control) {
         using namespace std::chrono_literals;
 
+        HELLO_I_AM(ThreadRole::Worker);
+
         while (true) {
             Bool nothing_to_do = true;
             Job job;