summaryrefslogtreecommitdiffstats
path: root/src/ByteBuffer.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-12-03 18:04:08 +0100
committerMattes D <github@xoft.cz>2014-12-03 18:04:08 +0100
commit664ea804a3fe4a5574d31b27ebe584aafb816be7 (patch)
tree68f6cdee7c5be8ac8fe8d949fdbf2fbf60f0e874 /src/ByteBuffer.h
parentMerge remote-tracking branch 'origin-master' into c++11 (diff)
downloadcuberite-664ea804a3fe4a5574d31b27ebe584aafb816be7.tar
cuberite-664ea804a3fe4a5574d31b27ebe584aafb816be7.tar.gz
cuberite-664ea804a3fe4a5574d31b27ebe584aafb816be7.tar.bz2
cuberite-664ea804a3fe4a5574d31b27ebe584aafb816be7.tar.lz
cuberite-664ea804a3fe4a5574d31b27ebe584aafb816be7.tar.xz
cuberite-664ea804a3fe4a5574d31b27ebe584aafb816be7.tar.zst
cuberite-664ea804a3fe4a5574d31b27ebe584aafb816be7.zip
Diffstat (limited to '')
-rw-r--r--src/ByteBuffer.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ByteBuffer.h b/src/ByteBuffer.h
index e80763772..2a316fa32 100644
--- a/src/ByteBuffer.h
+++ b/src/ByteBuffer.h
@@ -133,6 +133,12 @@ protected:
size_t m_DataStart; // Where the data starts in the ringbuffer
size_t m_WritePos; // Where the data ends in the ringbuffer
size_t m_ReadPos; // Where the next read will start in the ringbuffer
+
+ #ifdef _DEBUG
+ /** The ID of the thread currently accessing the object.
+ Used for checking that only one thread accesses the object at a time, via cSingleThreadAccessChecker. */
+ mutable std::thread::id m_ThreadID;
+ #endif
/** Advances the m_ReadPos by a_Count bytes */
void AdvanceReadPos(size_t a_Count);