LeviLamina
Loading...
Searching...
No Matches
BackgroundTask.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5#include "mc/deps/core/threading/Async.h"
6#include "mc/deps/core/threading/BackgroundTaskBase.h"
7#include "mc/deps/core/threading/IBackgroundTaskOwner.h"
8#include "mc/deps/core/threading/TaskStartInfo.h"
9#include "mc/platform/brstd/move_only_function.h"
10
11// clang-format off
12class TaskResult;
13// clang-format on
14
15template <typename T0, typename T1>
16class BackgroundTask : public ::BackgroundTaskBase {
17public:
18 // The task details base, the lock and the completion-handler vector are containers this
19 // repository has not reconstructed, so they are pinned down by size only. Everything after them
20 // has to sit at the offset the game gives it.
21 ::ll::UntypedStorage<8, 88> mUnkDetails; // 0x70 TaskDetails::BackgroundTaskDetails<T0, T1>
22 ::ll::UntypedStorage<8, 80> mUnkLock; // 0xC8 Bedrock::Threading::Mutex
23 ::ll::UntypedStorage<4, 4> mUnkStatus; // 0x118 TaskStatus
24 ::ll::UntypedStorage<8, 24> mUnkComplete; // 0x120 vector<CompletionHandlerInfo>
25 ::ll::UntypedStorage<1, 1> mUnkLinkCancellation; // 0x138 bool
26 ::ll::UntypedStorage<8, 16> mUnkPredecessor; // 0x140 Bedrock::Threading::SharedAsync<T1>
27
28public:
29 MCAPI static ::std::shared_ptr<::BackgroundTask<T0, T1>> create(
30 ::gsl::not_null<::IBackgroundTaskOwner*> owner,
31 ::TaskStartInfo const& startInfo,
33 bool isAsync,
35 );
36};
Definition BackgroundTask.h:16
The game spells this as an AsyncImplBase<T> base subobject holding the handle; a member at the same o...
Definition Async.h:13
Definition TaskResult.h:5
Definition move_only_function.h:9
Definition TaskStartInfo.h:5
Definition Alias.h:14