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"
44namespace Bedrock::Http {
class Request; }
45namespace Bedrock::Http {
class Response; }
46namespace Bedrock::Http {
struct Url; }
50namespace Bedrock::Services::chat::model {
struct BroadcastChatMessageResponseData; }
51namespace Bedrock::Services::chat::model {
struct SignChatMessageResponseData; }
52namespace Bedrock::Services::discovery::model {
struct EnvironmentQueryResponseData; }
53namespace Bedrock::Services::discovery::model {
struct ManagedServiceEnvironmentMetadata; }
54namespace Bedrock::Services::entitlements::model {
struct ConfirmRedeemCodeResponseData; }
55namespace Bedrock::Services::entitlements::model {
struct PrepareRedeemCodePreviewResponseData; }
56namespace Bedrock::Services::gatherings::model {
struct CheckPartyEligibilityResponseData; }
57namespace Bedrock::Services::gatherings::model {
struct ExperiencePlayerCountResponseData; }
58namespace Bedrock::Services::gatherings::model {
struct GetAllExperienceDiscoveryMetadataResponseData; }
59namespace Bedrock::Services::gatherings::model {
struct JoinResponseData; }
60namespace Bedrock::Services::layout::model {
struct BulkFabsResponseData; }
61namespace Bedrock::Services::layout::model {
struct FabChildren; }
62namespace Bedrock::Services::layout::model {
struct LayoutResponseData; }
63namespace Bedrock::Services::layout::model {
struct PageableDataBase; }
64namespace Bedrock::Services::layout::model {
struct PageableExperiences; }
65namespace Bedrock::Services::layout::model {
struct PageableStandardMarketplaceItemPreview; }
66namespace Bedrock::Services::layout::model {
struct PageableTiles; }
67namespace Bedrock::Services::layout::model {
struct SessionConfig; }
68namespace Bedrock::Services::multiplayer::model {
struct Party; }
69namespace Bedrock::Services::multiplayer::model {
struct PartyInvite; }
70namespace Bedrock::Services::multiplayer::model {
struct PartySummary; }
72namespace Json {
class Value; }
79namespace Social::Events {
class Event; }
94 template <
typename T0>
102 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::Scheduler>> mScheduler;
103 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::WorkerPool>> mWorkers;
104 ::ll::TypedStorage<8, 32, ::std::string> mName;
105 ::ll::TypedStorage<1, 1, bool> mCheckOwnerThread;
106 ::ll::TypedStorage<8, 80, ::std::mutex> mLock;
107 ::ll::TypedStorage<4, 4, ::std::atomic<::TaskGroupState>> mState;
108 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::BackgroundTaskBase>> mTasks;
109 ::ll::TypedStorage<8, 8, uint64> mTaskCount;
110 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::BackgroundTaskBase>> mEnumCurr;
111 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::BackgroundTaskBase>> mEnumNext;
112 ::ll::TypedStorage<8, 16, ::Bedrock::Threading::Async<void>> mResumeTaskHandle;
113 ::ll::TypedStorage<8, 80, ::std::mutex> mResumeTaskMutex;
117 LLNDAPI static ::IBackgroundTaskOwner* getCurrentTaskGroup();
126 virtual ::Bedrock::Threading::Async<void> queue_DEPRECATED(
132 virtual ::Bedrock::Threading::Async<void> queueSync_DEPRECATED(
137 virtual ~TaskGroup() ;
139 virtual void taskRegister(::std::shared_ptr<::BackgroundTaskBase> task) ;
141 virtual void requeueTask(::std::shared_ptr<::BackgroundTaskBase> task,
bool queueImmediate) ;
143 virtual ::TaskGroupState getState() const ;
145 virtual
void processCoroutines() ;
149 virtual
bool _workerPoolIsAsync() const;
157 MCNAPI
void _doWorkUntil(::Bedrock::Threading::SharedAsync<
void> task, ::brstd::promise<
void>* workStarted);
160 ::Bedrock::Threading::UniqueLock<::
std::mutex>& lock,
167 MCNAPI uint64 count()
const;
170 MCNAPI
void flush(::std::function<
void()> waitFn);
172 MCAPI
bool isEmpty()
const;
180 MCNAPI static ::Bedrock::Threading::Async<void>
211 MCNAPI ::Bedrock::Threading::Async<void>
216 MCNAPI
void $requeueTask(::std::shared_ptr<::BackgroundTaskBase> task,
bool queueImmediate);
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:15
Definition TaskGroup.h:95
Definition TaskGroup.h:97
MCAPI void _forAllTasks(::Bedrock::Threading::UniqueLock<::std::mutex > &lock, ::std::function< void(::std::shared_ptr<::BackgroundTaskBase > const &)> callback)
MCAPI ::Bedrock::Threading::Async< void > $queueSync_DEPRECATED(::TaskStartInfo const &startInfo, ::brstd::move_only_function<::TaskResult()> &&task)
MCAPI void $taskRegister(::std::shared_ptr<::BackgroundTaskBase > task)
MCAPI void $taskComplete(::gsl::not_null<::BackgroundTaskBase * > task)
MCAPI::TaskGroupState $getState() const
MCAPI ::Bedrock::Threading::Async< void > $queue_DEPRECATED(::TaskStartInfo const &startInfo, ::brstd::move_only_function<::TaskResult()> &&task, ::brstd::move_only_function< void()> &&callback)
MCAPI void $requeueTask(::std::shared_ptr<::BackgroundTaskBase > task, bool queueImmediate)
MCAPI void flush(::std::function< void()> waitFn)
MCAPI void $processCoroutines()
static MCAPI ::Bedrock::Threading::Async< void > queueChild_DEPRECATED(::TaskStartInfo const &startInfo, ::brstd::move_only_function<::TaskResult()> &&task, ::brstd::move_only_function< void()> &&callback)
MCAPI void _doWorkUntil(::Bedrock::Threading::SharedAsync< void > task, ::brstd::promise< void > *workStarted)
static MCAPI ::Bedrock::Threading::Async< void > queueChildSync_DEPRECATED(::TaskStartInfo const &startInfo, ::brstd::move_only_function<::TaskResult()> &&task)
MCAPI bool $_workerPoolIsAsync() const
Definition TaskResult.h:5
Definition WorkerPool.h:22
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 PackModifications.h:7
Definition TextFilterResult.h:7
Definition SignalingClientConfiguration.h:5
Definition TaskStartInfo.h:5