CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
25 namespace boost {
namespace asio {
class io_context; } }
27 namespace catapult {
namespace thread {
39 virtual const std::string&
tag()
const = 0;
42 virtual boost::asio::io_context&
ioContext() = 0;
47 virtual void start() = 0;
50 virtual void join() = 0;
55 std::unique_ptr<IoThreadPool>
CreateIoThreadPool(
size_t numWorkerThreads,
const char* name =
nullptr);
std::unique_ptr< ThreadPoolContext > m_pContext
Definition: IoThreadPool.cpp:130
boost::thread_group m_threads
Definition: IoThreadPool.cpp:57
std::string m_tag
Definition: IoThreadPool.cpp:127
#define CATAPULT_LOG(SEV)
Writes a log entry to the default logger with SEV severity.
Definition: Logging.h:340
virtual uint32_t numWorkerThreads() const =0
Gets the number of active worker threads.
def debug(*args)
Definition: Parser.py:46
Represents a thread pool that shares a single io context across multiple threads.
Definition: IoThreadPool.h:30
virtual ~IoThreadPool()=default
Definition: IoThreadPool.h:25
ConnectionSecurityMode
Possible connection security modes.
Definition: ConnectionSecurityMode.h:36
std::atomic< uint32_t > m_numWorkerThreads
Definition: IoThreadPool.cpp:131
virtual const std::string & tag() const =0
Gets the friendly name of this thread pool.
boost::asio::executor_work_guard< boost::asio::io_context::executor_type > m_work
Definition: IoThreadPool.cpp:56
std::unique_ptr< IoThreadPool > CreateIoThreadPool(size_t numWorkerThreads, const char *name)
Definition: IoThreadPool.cpp:146
virtual boost::asio::io_context & ioContext()=0
Gets the underlying io_context.
#define CATAPULT_THROW_RUNTIME_ERROR_1(MESSAGE, PARAM1)
Macro used to throw a catapult runtime error with a single parameter.
Definition: exceptions.h:171
void SetThreadName(const std::string &name)
Definition: ThreadInfo.cpp:69
virtual void join()=0
Waits for all thread pool threads to exit.
def info(*args)
Definition: forwardsValidation.py:12
bool TryParseBitwiseEnumValue(const std::array< std::pair< const char *, T >, N > &stringToValueMapping, const std::string &str, T &parsedValues)
Tries to parse str into a bitwise enum value (parsedValue) given a mapping of strings to values (stri...
Definition: ConfigurationValueParsers.h:118
AtomicIncrementDecrementGuard< T > MakeIncrementDecrementGuard(std::atomic< T > &value)
Factory function for creating AtomicIncrementDecrementGuard<T>.
Definition: AtomicIncrementDecrementGuard.h:48
Definition: AddressExtractionExtension.cpp:28
size_t m_numConfiguredWorkerThreads
Definition: IoThreadPool.cpp:126
boost::asio::io_context m_ioContext
Definition: IoThreadPool.cpp:129
bool TryParseValue(const std::string &str, ConnectionSecurityMode &modes)
Tries to parse str into connection security modes.
Definition: IoEnums.cpp:72