3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/deps/core/file/PathBuffer.h"
7#include "mc/deps/core/threading/Async.h"
8#include "mc/deps/core/threading/IBackgroundTaskOwner.h"
9#include "mc/deps/core/threading/SharedAsync.h"
10#include "mc/deps/core/threading/TaskGroupState.h"
11#include "mc/deps/core/utility/NonOwnerPointer.h"
12#include "mc/deps/nether_net/ESessionError.h"
13#include "mc/deps/services/Discriminated.h"
14#include "mc/editor/services/playtest/SessionResult.h"
15#include "mc/network/services/signaling/ISignalingServiceConfigProvider.h"
16#include "mc/platform/ErrorInfo.h"
17#include "mc/platform/Result.h"
18#include "mc/platform/brstd/copyable_function.h"
19#include "mc/platform/brstd/move_only_function.h"
20#include "mc/platform/brstd/promise.h"
21#include "mc/platform/threading/UniqueLock.h"
22#include "mc/server/commands/edu/make_code_fileio/MakeCodeFileResult.h"
23#include "mc/world/level/FileArchiver.h"
45namespace Bedrock::Http {
class Request; }
46namespace Bedrock::Http {
class Response; }
47namespace Bedrock::Http {
struct Url; }
51namespace Bedrock::Services::discovery::model {
struct EnvironmentQueryResponseData; }
52namespace Bedrock::Services::discovery::model {
struct ManagedServiceEnvironmentMetadata; }
53namespace Bedrock::Services::gatherings::model {
struct CheckPartyEligibilityResponseData; }
54namespace Bedrock::Services::gatherings::model {
struct ExperiencePlayerCountResponseData; }
55namespace Bedrock::Services::gatherings::model {
struct GetAllExperienceDiscoveryMetadataResponseData; }
56namespace Bedrock::Services::gatherings::model {
struct JoinResponseData; }
57namespace Bedrock::Services::layout::model {
struct BulkFabsResponseData; }
58namespace Bedrock::Services::layout::model {
struct FabChildren; }
59namespace Bedrock::Services::layout::model {
struct LayoutResponseData; }
60namespace Bedrock::Services::layout::model {
struct PageableDataBase; }
61namespace Bedrock::Services::layout::model {
struct PageableExperiences; }
62namespace Bedrock::Services::layout::model {
struct PageableStandardMarketplaceItemPreview; }
63namespace Bedrock::Services::layout::model {
struct SessionConfig; }
64namespace Bedrock::Services::multiplayer::model {
struct Party; }
65namespace Bedrock::Services::multiplayer::model {
struct PartyInvite; }
66namespace Bedrock::Services::multiplayer::model {
struct PartySummary; }
67namespace Bedrock::Services::safety::model {
struct RoomResponseData; }
68namespace Bedrock::Services::safety::model {
struct ScanResponseData; }
69namespace Bedrock::Services::safety_client::model {
struct ImageValidationResult; }
70namespace Bedrock::Services::safety_client::model {
struct SkinValidationResult; }
71namespace Bedrock::Services::safety_client::model {
struct TextValidationResult; }
73namespace Json {
class Value; }
80namespace Social::Events {
class Event; }
95 template <
typename T0>
103 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::Scheduler>> mScheduler;
104 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::WorkerPool>> mWorkers;
105 ::ll::TypedStorage<8, 32, ::std::string> mName;
106 ::ll::TypedStorage<1, 1, bool> mCheckOwnerThread;
107 ::ll::TypedStorage<8, 80, ::std::mutex> mLock;
108 ::ll::TypedStorage<4, 4, ::std::atomic<::TaskGroupState>> mState;
109 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::BackgroundTaskBase>> mTasks;
110 ::ll::TypedStorage<8, 8, uint64> mTaskCount;
111 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::BackgroundTaskBase>> mEnumCurr;
112 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::BackgroundTaskBase>> mEnumNext;
113 ::ll::TypedStorage<8, 16, ::Bedrock::Threading::Async<void>> mResumeTaskHandle;
114 ::ll::TypedStorage<8, 80, ::std::mutex> mResumeTaskMutex;
118 LLNDAPI static ::IBackgroundTaskOwner* getCurrentTaskGroup();
127 virtual ::Bedrock::Threading::Async<void> queue_DEPRECATED(
130 ::std::function<
void()>&& callback
133 virtual ::Bedrock::Threading::Async<void> queueSync_DEPRECATED(
138 virtual ~TaskGroup() ;
140 virtual void taskRegister(::std::shared_ptr<::BackgroundTaskBase> task) ;
142 virtual void requeueTask(::std::shared_ptr<::BackgroundTaskBase> task,
bool queueImmediate) ;
144 virtual ::TaskGroupState getState() const ;
146 virtual
void processCoroutines() ;
150 virtual
bool _workerPoolIsAsync() const;
158 MCAPI
void _doWorkUntil(::Bedrock::Threading::SharedAsync<
void> task, ::brstd::promise<
void>* workStarted);
160 MCAPI
void _forAllTasks(
161 ::Bedrock::Threading::UniqueLock<::
std::mutex>& lock,
168 MCAPI uint64 count()
const;
171 MCAPI
void flush(::std::function<
void()> waitFn);
173 MCAPI
bool isEmpty()
const;
181 MCAPI static ::Bedrock::Threading::Async<void>
184 MCAPI static ::Bedrock::Threading::Async<void> queueChild_DEPRECATED(
187 ::std::function<
void()>&& callback
206 MCAPI ::Bedrock::Threading::Async<void> $queue_DEPRECATED(
209 ::std::function<
void()>&& callback
212 MCAPI ::Bedrock::Threading::Async<void>
215 MCAPI
void $taskRegister(::std::shared_ptr<::BackgroundTaskBase> task);
217 MCAPI
void $requeueTask(::std::shared_ptr<::BackgroundTaskBase> task,
bool queueImmediate);
219 MCFOLD ::TaskGroupState $getState()
const;
221 MCAPI
void $processCoroutines();
223 MCAPI
void $taskComplete(::gsl::not_null<::BackgroundTaskBase*> task);
225 MCAPI
bool $_workerPoolIsAsync()
const;
Definition BackgroundTaskBase.h:18
Definition EditorNetworkPacket.h:19
Definition IBackgroundTaskOwner.h:17
Definition JsonRpcError.h:7
Definition TurnConfigResult.h:7
Definition ResourcePack.h:25
Definition Scheduler.h:14
Definition TaskGroup.h:96
Definition TaskGroup.h:98
Definition TaskResult.h:5
Definition WorkerPool.h:16
Definition WorldPacksHistoryFile.h:11
Definition move_only_function.h:9
Definition AsyncJoinAllow.h:5
Definition AsyncJoinDeny.h:8
Definition AzureGetTokenHttpResponse.h:7
Definition EnvironmentQueryResponse.h:12
Definition ServiceError.h:12
Definition CachedAsyncRetry.h:7
Definition DedicatedServerInitResult.h:7
Definition NetworkSystemDep.h:10
Definition ServerInstanceDep.h:10
Definition MakeCodeFileIOReadResult.h:10
Definition MinecraftServiceKeyInfo.h:5
Definition PackCommandResult.h:7
Definition PackSourceLoadResult.h:5
Definition PingedCompatibleServer.h:5
Definition PackModifications.h:7
Definition TextFilterResult.h:7
Definition SignalingClientConfiguration.h:5
Definition TaskStartInfo.h:5