summary refs log tree commit diff
path: root/src/Compute
diff options
context:
space:
mode:
Diffstat (limited to 'src/Compute')
-rw-r--r--src/Compute/Queue.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Compute/Queue.hpp b/src/Compute/Queue.hpp
index 06469f8..e201932 100644
--- a/src/Compute/Queue.hpp
+++ b/src/Compute/Queue.hpp
@@ -25,6 +25,11 @@ public:
         m_control->work.jobs.emplace(id, priority, execute);
     }
 
+    USize size() const {
+        std::scoped_lock work_lock(m_control->work.mutex);
+        return m_control->work.jobs.size();
+    }
+
     struct Result {
         I id{};
         X res;