MCPcopy Create free account
hub / github.com/apache/arrow / LockExclusive

Method LockExclusive

cpp/src/arrow/io/interfaces.cc:388–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

386}
387
388void SharedExclusiveChecker::LockExclusive() {
389 std::lock_guard<std::mutex> lock(impl_->mutex);
390 ARROW_CHECK_EQ(impl_->n_shared, 0)
391 << "Cannot perform exclusive I/O operation (Read/Seek/Tell/Peek/Close/Abort) while "
392 "position-independent operations (ReadAt/GetSize) are in progress";
393 ARROW_CHECK_EQ(impl_->n_exclusive, 0)
394 << "Cannot perform exclusive I/O operation (Read/Seek/Tell/Peek/Close/Abort) while "
395 "another exclusive operation is already in progress";
396 ++impl_->n_exclusive;
397}
398
399void SharedExclusiveChecker::UnlockExclusive() {
400 std::lock_guard<std::mutex> lock(impl_->mutex);

Callers 1

ExclusiveLockGuardMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected