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

Method LockShared

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

Source from the content-addressed store, hash-verified

372SharedExclusiveChecker::SharedExclusiveChecker() : impl_(new Impl) {}
373
374void SharedExclusiveChecker::LockShared() {
375 std::lock_guard<std::mutex> lock(impl_->mutex);
376 ARROW_CHECK_EQ(impl_->n_exclusive, 0)
377 << "Cannot perform position-independent I/O (ReadAt/GetSize) while an "
378 "exclusive operation (Read/Seek/Tell/Peek/Close/Abort) is in progress";
379 ++impl_->n_shared;
380}
381
382void SharedExclusiveChecker::UnlockShared() {
383 std::lock_guard<std::mutex> lock(impl_->mutex);

Callers 1

SharedLockGuardMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected