From d0fbd68055e3f4a796330cc8acc6c0954b5327ff Mon Sep 17 00:00:00 2001 From: untodesu Date: Thu, 11 Sep 2025 15:48:53 +0500 Subject: Run clang-format across the project --- core/threading.hh | 92 +++++++++++++++++++++++++++---------------------------- 1 file changed, 46 insertions(+), 46 deletions(-) (limited to 'core/threading.hh') 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 m_status; - std::future 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 -void submit(AT&&... args); -} // namespace threading - -template -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 m_status; + std::future 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 +void submit(AT&&... args); +} // namespace threading + +template +inline void threading::submit(AT&&... args) +{ + threading::detail::submit_new(new T(args...)); +} -- cgit