LeviLamina
Loading...
Searching...
No Matches
ThreadOwner.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4#include "mc/deps/application/common/utility/ThreadOwnerBehavior.h"
5
6namespace Bedrock::Application {
7
8template <typename T0, ThreadOwnerBehavior WrongThreadBehavior = ThreadOwnerBehavior::Assert>
10public:
11 T0 mObject;
12 bool mThreadIdInitialized{};
13 std::thread::id mThreadId;
14 uint mThreadCheckIndex{};
15
16public:
17 // prevent constructor by default
18 ThreadOwner& operator=(ThreadOwner const&) = delete;
19 ThreadOwner(ThreadOwner const&) = delete;
20 ThreadOwner() = delete;
21};
22
23} // namespace Bedrock::Application
Definition ThreadOwner.h:9