25 enum class RunOneResult :
int {
31 enum class State :
int {
37 using SortingJobQueue =
45 ::ll::TypedStorage<1, 1, bool const> mAsync;
46 ::ll::TypedStorage<4, 4, ::Bedrock::Threading::OSThreadPriority> mPriority;
47 ::ll::TypedStorage<8, 16, ::std::optional<uint64>> mCoreAffinity;
48 ::ll::TypedStorage<4, 8, ::std::optional<int>> mIdealCore;
49 ::ll::TypedStorage<8, 32, ::std::string> mName;
50 ::ll::TypedStorage<1, 1, ::Core::Profile::ThreadFrameType> mFrameType;
51 ::ll::TypedStorage<8, 16, ::std::thread> mThread;
52 ::ll::TypedStorage<4, 4, ::std::thread::id> mWorkerThreadID;
53 ::ll::TypedStorage<4, 4, ::std::atomic<::BackgroundWorker::State>> mState;
54 ::ll::TypedStorage<8, 160, ::ResetEventObj> mResetEvent;
55 ::ll::TypedStorage<1, 1, ::std::atomic<bool>> mIdle;
56 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mIdleSinceTime;
57 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::BackgroundTaskBase>> mCurrentTask;
58 ::ll::TypedStorage<8, 8, ::WorkerPool&> mWorkerPool;
59 ::ll::TypedStorage<8, 8, ::std::chrono::nanoseconds> mMaxSpinlockDuration;
60 ::ll::TypedStorage<8, 360, ::BackgroundTaskQueue> mTaskQueue;
65 BackgroundWorker& operator=(BackgroundWorker
const&);
66 BackgroundWorker(BackgroundWorker
const&);
72 virtual ~BackgroundWorker() =
default;
74 virtual bool isAsync()
const ;
76 virtual bool canTaskRunAgain()
const ;
83 ::std::string_view name,
84 ::Core::Profile::ThreadFrameType frameType,
87 ::std::optional<uint64>
const coreAffinity,
88 ::std::optional<int>
const idealCore,
94 MCNAPI
void queue(::std::shared_ptr<::BackgroundTaskBase> task);
105 ::std::string_view name,
106 ::Core::Profile::ThreadFrameType frameType,
109 ::std::optional<uint64>
const coreAffinity,
110 ::std::optional<int>
const idealCore,
MCAPI BackgroundWorker(::std::string_view name, ::Core::Profile::ThreadFrameType frameType, bool async, ::Bedrock::Threading::OSThreadPriority const &priority, ::std::optional< uint64 > const coreAffinity, ::std::optional< int > const idealCore, ::WorkerPool &workerPool)
MCAPI void * $ctor(::std::string_view name, ::Core::Profile::ThreadFrameType frameType, bool async, ::Bedrock::Threading::OSThreadPriority const &priority, ::std::optional< uint64 > const coreAffinity, ::std::optional< int > const idealCore, ::WorkerPool &workerPool)
Definition ITaskExecutionContext.h:5