mirror of
https://github.com/EvernodeXRPL/hpcore.git
synced 2026-04-29 15:37:59 +00:00
Implemented multi-threaded inbound network message processing. (#115)
Used per-session thread to offload messages from network and a single thread for processing collected messages.
This commit is contained in:
10
src/main.cpp
10
src/main.cpp
@@ -137,9 +137,17 @@ void std_terminate() noexcept
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
//seed rand
|
||||
// seed rand
|
||||
srand(util::get_epoch_milliseconds());
|
||||
|
||||
// Disable SIGPIPE to avoid crashing on broken pipe IO.
|
||||
{
|
||||
sigset_t mask;
|
||||
sigemptyset(&mask);
|
||||
sigaddset(&mask, SIGPIPE);
|
||||
pthread_sigmask(SIG_BLOCK, &mask, NULL);
|
||||
}
|
||||
|
||||
// Register exception handler for std exceptions.
|
||||
std::set_terminate(&std_terminate);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user