Commit 1b41d8dd authored by Aaryaman Sagar's avatar Aaryaman Sagar Committed by Facebook Github Bot

Remove extra folly:: prefix in folly::lock

Reviewed By: yfeldblum

Differential Revision: D7726522

fbshipit-source-id: fa5ad9fc29152b52c5256849c2822885acd49c23
parent 3e53ef8d
...@@ -982,7 +982,7 @@ auto /* std::tuple<LockedPtr...> */ lock(SynchronizedLocker... lockersIn) { ...@@ -982,7 +982,7 @@ auto /* std::tuple<LockedPtr...> */ lock(SynchronizedLocker... lockersIn) {
while (true) { while (true) {
auto couldLockAll = true; auto couldLockAll = true;
folly::for_each(lockers, [&](auto& locker, auto index) { for_each(lockers, [&](auto& locker, auto index) {
// if we should try_lock on the current locker then do so // if we should try_lock on the current locker then do so
if (index != indexLocked) { if (index != indexLocked) {
auto lockedPtr = locker.tryLock(); auto lockedPtr = locker.tryLock();
...@@ -1000,18 +1000,18 @@ auto /* std::tuple<LockedPtr...> */ lock(SynchronizedLocker... lockersIn) { ...@@ -1000,18 +1000,18 @@ auto /* std::tuple<LockedPtr...> */ lock(SynchronizedLocker... lockersIn) {
lockedPtrs = std::tuple<typename SynchronizedLocker::LockedPtr...>{}; lockedPtrs = std::tuple<typename SynchronizedLocker::LockedPtr...>{};
std::this_thread::yield(); std::this_thread::yield();
folly::fetch(lockedPtrs, index) = locker.lock(); fetch(lockedPtrs, index) = locker.lock();
indexLocked = index; indexLocked = index;
couldLockAll = false; couldLockAll = false;
return folly::loop_break; return loop_break;
} }
// else store the locked mutex in the list we return // else store the locked mutex in the list we return
folly::fetch(lockedPtrs, index) = std::move(lockedPtr); fetch(lockedPtrs, index) = std::move(lockedPtr);
} }
return folly::loop_continue; return loop_continue;
}); });
if (couldLockAll) { if (couldLockAll) {
...@@ -1635,7 +1635,7 @@ void lock(LockableOne& one, LockableTwo& two, Lockables&... lockables) { ...@@ -1635,7 +1635,7 @@ void lock(LockableOne& one, LockableTwo& two, Lockables&... lockables) {
// release ownership of the locks from the RAII lock wrapper returned by the // release ownership of the locks from the RAII lock wrapper returned by the
// function above // function above
folly::for_each(locks, [&](auto& lock) { lock.release(); }); for_each(locks, [&](auto& lock) { lock.release(); });
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment