MCPcopy Create free account
hub / github.com/Snapchat/Valdi / onWriteBegin

Method onWriteBegin

snap_drawing/src/snap_drawing/cpp/Utils/SafeContainer.cpp:40–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40void SafeContainerBase::onWriteBegin() {
41 if (_readCount > 0) {
42 SC_ASSERT_FAIL("Cannot acquire write lock: read lock already acquired");
43 }
44 if (_writeCount > 0) {
45 SC_ASSERT_FAIL("Cannot acquire write lock: write lock already acquired");
46 }
47 _writeCount++;
48}
49
50void SafeContainerBase::onWriteEnd() {
51 _writeCount--;

Callers 1

WriteMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected