| 1 | #pragma once |
|---|---|
| 2 | |
| 3 | #include <basis/seadTypes.h> |
| 4 | #include <mc/seadCoreInfo.h> |
| 5 | #include <prim/seadSafeString.h> |
| 6 | |
| 7 | #include "Library/Thread/FunctorV0M.h" |
| 8 | |
| 9 | namespace sead { |
| 10 | class DelegateThread; |
| 11 | class Thread; |
| 12 | } // namespace sead |
| 13 | |
| 14 | namespace al { |
| 15 | class AsyncFunctorThread { |
| 16 | public: |
| 17 | AsyncFunctorThread(const sead::SafeString& functor_name, const FunctorBase& functor, |
| 18 | s32 priority, s32 stack_size, sead::CoreId id); |
| 19 | virtual ~AsyncFunctorThread(); |
| 20 | |
| 21 | void threadFunction(sead::Thread* unused_1, s64 unused_2); |
| 22 | void start(); |
| 23 | bool isDone() const; |
| 24 | |
| 25 | private: |
| 26 | sead::DelegateThread* mDelegateThread = nullptr; |
| 27 | FunctorBase* mFunctor = nullptr; |
| 28 | bool mIsDone = true; |
| 29 | }; |
| 30 | |
| 31 | static_assert(sizeof(AsyncFunctorThread) == 0x20); |
| 32 | } // namespace al |
| 33 |