OnixS C++ ICE Binary Order Entry Handler 1.1.1
API Documentation
Loading...
Searching...
No Matches
SignalHelper Struct Reference

Static Public Member Functions

static void manageSignals () noexcept
static ONIXS_ICEBOE_FORCEINLINE bool interruptDetected () noexcept
static void waitUntilKey (const std::string &message)

Detailed Description

  • Mask signals in all threads;
  • Start a separate thread to catch signals;

Definition at line 44 of file Signal.h.

Member Function Documentation

◆ interruptDetected()

ONIXS_ICEBOE_FORCEINLINE bool interruptDetected ( )
inlinestaticnoexcept

Definition at line 52 of file Signal.h.

53 {
54 return interruptDetectedFlag().load(std::memory_order_relaxed);
55 }

◆ manageSignals()

void manageSignals ( )
inlinestaticnoexcept

Definition at line 46 of file Signal.h.

47 {
48 manageSignalsImpl();
49 }

◆ waitUntilKey()

void waitUntilKey ( const std::string & message)
inlinestatic

Definition at line 57 of file Signal.h.

58 {
59 std::clog << "\nPress <Ctrl+C> to " << message << ".." << std::endl;
60
61 while(!interruptDetected())
62 Threading::ThisThread::sleep(0);
63 }