Common/Tests: Address Feedback
This commit is contained in:
parent
3398f701ee
commit
1f7dd36499
9 changed files with 51 additions and 39 deletions
|
@ -35,8 +35,9 @@ void thread_pause() {
|
|||
namespace Common {
|
||||
|
||||
void SpinLock::lock() {
|
||||
while (lck.test_and_set(std::memory_order_acquire))
|
||||
while (lck.test_and_set(std::memory_order_acquire)) {
|
||||
thread_pause();
|
||||
}
|
||||
}
|
||||
|
||||
void SpinLock::unlock() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue