File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ namespace tsom
2121
2222 public:
2323 ChunkLock (ChunkType chunk);
24+ ChunkLock (ChunkType chunk, std::adopt_lock_t );
25+ ChunkLock (ChunkType chunk, std::defer_lock_t );
2426 ChunkLock (const ChunkLock&) = delete ;
2527 ChunkLock (ChunkLock&& chunkLock) noexcept ;
2628 ~ChunkLock ();
Original file line number Diff line number Diff line change @@ -9,6 +9,19 @@ namespace tsom
99 template <bool Write>
1010 ChunkLock<Write>::ChunkLock(ChunkType chunk) :
1111 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+ }
21+
22+ template <bool Write>
23+ ChunkLock<Write>::ChunkLock(ChunkType chunk, std::defer_lock_t ) :
24+ m_isLocked (false )
1225 {
1326 }
1427
You can’t perform that action at this time.
0 commit comments