| CatapultServer
    v0.5.0.1 (Elephant)
    | 
 
 
 
Go to the documentation of this file.
   26 namespace catapult { 
namespace utils {
 
   42                 std::this_thread::yield();
 
   47             return !
m_isLocked.test_and_set(std::memory_order_acquire);
 
  
 
SpinLock()
Creates an unlocked lock.
Definition: SpinLock.h:34
DEFINE_OBSERVER(AccountAddress, model::AccountAddressNotification, [](const auto ¬ification, const auto &context) { DefaultAccountVisitor visitor(context);visitor.visit(notification.Address);})
void lock()
Blocks until a lock can be obtained for the current execution agent.
Definition: SpinLock.h:40
Definition: SpinLock.h:31
bool try_lock()
Attempts to acquire the lock for the current execution agent without blocking.
Definition: SpinLock.h:46
void unlock() noexcept
Releases the lock held by the execution agent. Throws no exceptions.
Definition: SpinLock.h:51
std::atomic_flag m_isLocked
Definition: SpinLock.h:56
Definition: AddressExtractionExtension.cpp:28
std::lock_guard< SpinLock > SpinLockGuard
A spin lock guard.
Definition: SpinLock.h:60