CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
25 #include <unordered_set>
27 namespace catapult {
namespace utils {
56 template<
typename TAction>
58 auto id = std::this_thread::get_id();
Exception class that is thrown when reader reentrancy is detected.
Definition: ReentrancyCheckReaderNotificationPolicy.h:30
void readerReleased()
A reader was released by the current thread.
Definition: ReentrancyCheckReaderNotificationPolicy.h:49
SpinLock m_mutex
Definition: ReentrancyCheckReaderNotificationPolicy.h:65
Definition: SpinLock.h:31
std::unordered_set< std::thread::id > m_threadIds
Definition: ReentrancyCheckReaderNotificationPolicy.h:66
void executeSynchronized(TAction action)
Definition: ReentrancyCheckReaderNotificationPolicy.h:57
A reentrancy check reader notification policy.
Definition: ReentrancyCheckReaderNotificationPolicy.h:36
catapult_error< std::runtime_error > catapult_runtime_error
Definition: exceptions.h:87
#define CATAPULT_THROW_AND_LOG_1(TYPE, MESSAGE, PARAM1)
Macro used to throw a catapult exception with one parameter.
Definition: exceptions.h:152
std::function< void()> action
An action function.
Definition: functions.h:27
Definition: AddressExtractionExtension.cpp:28
Base class for all catapult exceptions that derives from both std::exception and boost::exception.
Definition: exceptions.h:42
std::lock_guard< SpinLock > SpinLockGuard
A spin lock guard.
Definition: SpinLock.h:60
void readerAcquired()
A reader was acquried by the current thread.
Definition: ReentrancyCheckReaderNotificationPolicy.h:39