59 if (!
state_.compare_exchange_strong(
60 expected_state, next_state, std::memory_order_relaxed)) {
62 StatusCode::PRECONDITION_NOT_MET,
"Already started.");
Class of exceptions in cpp-msgpack-rpc library.
State
Enumeration of states.
void handle_processing_stopped()
Handle the condition that processing has been stopped.
std::atomic< State > state_
Whether the process of this connection is started.
BackgroundTaskStateMachine()=default
Constructor.
bool is_processing() const noexcept
Check whether processing.
void handle_start_request()
Handle the condition that starting processing is requested.
void handle_processing_started()
Handle the condition that processing is started.
bool handle_stop_requested()
Handle the condition that stopping processing is requested.
Definition of MsgpackRPCException class.
Namespace of transport of messages.
Definition of StatusCode enumeration.