diff options
Diffstat (limited to 'src/mongo/db/catalog/collection.cpp')
-rw-r--r-- | src/mongo/db/catalog/collection.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/catalog/collection.cpp b/src/mongo/db/catalog/collection.cpp index 0d86d5c1572..f46d636240f 100644 --- a/src/mongo/db/catalog/collection.cpp +++ b/src/mongo/db/catalog/collection.cpp @@ -42,13 +42,13 @@ namespace mongo { // void CappedInsertNotifier::notifyAll() { - stdx::lock_guard<stdx::mutex> lk(_mutex); + stdx::lock_guard<Latch> lk(_mutex); ++_version; _notifier.notify_all(); } void CappedInsertNotifier::waitUntil(uint64_t prevVersion, Date_t deadline) const { - stdx::unique_lock<stdx::mutex> lk(_mutex); + stdx::unique_lock<Latch> lk(_mutex); while (!_dead && prevVersion == _version) { if (stdx::cv_status::timeout == _notifier.wait_until(lk, deadline.toSystemTimePoint())) { return; @@ -57,13 +57,13 @@ void CappedInsertNotifier::waitUntil(uint64_t prevVersion, Date_t deadline) cons } void CappedInsertNotifier::kill() { - stdx::lock_guard<stdx::mutex> lk(_mutex); + stdx::lock_guard<Latch> lk(_mutex); _dead = true; _notifier.notify_all(); } bool CappedInsertNotifier::isDead() { - stdx::lock_guard<stdx::mutex> lk(_mutex); + stdx::lock_guard<Latch> lk(_mutex); return _dead; } |