summaryrefslogtreecommitdiffstats
path: root/core/threading.hh
diff options
context:
space:
mode:
authoruntodesu <kirill@untode.su>2025-09-11 15:48:53 +0500
committeruntodesu <kirill@untode.su>2025-09-11 15:48:53 +0500
commitd0fbd68055e3f4a796330cc8acc6c0954b5327ff (patch)
treee581014ea02711efa5e71f00f9862e5bca58f2ed /core/threading.hh
parentcbd823aa2154a956e7da4319eecbf7afc10441ae (diff)
downloadvoxelius-d0fbd68055e3f4a796330cc8acc6c0954b5327ff.tar.bz2
voxelius-d0fbd68055e3f4a796330cc8acc6c0954b5327ff.zip
Run clang-format across the project
Diffstat (limited to 'core/threading.hh')
-rw-r--r--core/threading.hh92
1 files changed, 46 insertions, 46 deletions
diff --git a/core/threading.hh b/core/threading.hh
index 14f17f8..2225907 100644
--- a/core/threading.hh
+++ b/core/threading.hh
@@ -1,46 +1,46 @@
-#pragma once
-
-enum class task_status : unsigned int {
- ENQUEUED = 0x0000U,
- PROCESSING = 0x0001U,
- COMPLETED = 0x0002U,
- CANCELLED = 0x0004U,
-};
-
-class Task {
-public:
- virtual ~Task(void) = default;
- virtual void process(void) = 0;
- virtual void finalize(void) = 0;
-
- task_status get_status(void) const;
- void set_status(task_status status);
-
-protected:
- std::atomic<task_status> m_status;
- std::future<void> m_future;
-};
-
-namespace threading
-{
-void init(void);
-void shutdown(void);
-void update(void);
-} // namespace threading
-
-namespace threading::detail
-{
-void submit_new(Task* task);
-} // namespace threading::detail
-
-namespace threading
-{
-template<typename T, typename... AT>
-void submit(AT&&... args);
-} // namespace threading
-
-template<typename T, typename... AT>
-inline void threading::submit(AT&&... args)
-{
- threading::detail::submit_new(new T(args...));
-}
+#pragma once
+
+enum class task_status : unsigned int {
+ ENQUEUED = 0x0000U,
+ PROCESSING = 0x0001U,
+ COMPLETED = 0x0002U,
+ CANCELLED = 0x0004U,
+};
+
+class Task {
+public:
+ virtual ~Task(void) = default;
+ virtual void process(void) = 0;
+ virtual void finalize(void) = 0;
+
+ task_status get_status(void) const;
+ void set_status(task_status status);
+
+protected:
+ std::atomic<task_status> m_status;
+ std::future<void> m_future;
+};
+
+namespace threading
+{
+void init(void);
+void shutdown(void);
+void update(void);
+} // namespace threading
+
+namespace threading::detail
+{
+void submit_new(Task* task);
+} // namespace threading::detail
+
+namespace threading
+{
+template<typename T, typename... AT>
+void submit(AT&&... args);
+} // namespace threading
+
+template<typename T, typename... AT>
+inline void threading::submit(AT&&... args)
+{
+ threading::detail::submit_new(new T(args...));
+}