We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a790e9 commit 0f34deeCopy full SHA for 0f34dee
2 files changed
include/CommonLib/ChunkLock.hpp
@@ -21,6 +21,8 @@ namespace tsom
21
22
public:
23
ChunkLock(ChunkType chunk);
24
+ ChunkLock(ChunkType chunk, std::adopt_lock_t);
25
+ ChunkLock(ChunkType chunk, std::defer_lock_t);
26
ChunkLock(const ChunkLock&) = delete;
27
ChunkLock(ChunkLock&& chunkLock) noexcept;
28
~ChunkLock();
include/CommonLib/ChunkLock.inl
@@ -9,6 +9,19 @@ namespace tsom
9
template<bool Write>
10
ChunkLock<Write>::ChunkLock(ChunkType chunk) :
11
m_isLocked(false)
12
+ {
13
+ Lock();
14
+ }
15
+
16
+ template<bool Write>
17
+ ChunkLock<Write>::ChunkLock(ChunkType chunk, std::adopt_lock_t) :
18
+ m_isLocked(true)
19
20
+ ChunkLock<Write>::ChunkLock(ChunkType chunk, std::defer_lock_t) :
+ m_isLocked(false)
{
}
0 commit comments