EPAM B2BITS CME MDP Handler C++  5.3.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | List of all members
Cme::Mdp::Instrument::LockGuard Struct Reference

Helper class, provides thread-safe access to Instrument data. More...

#include <B2BITS_CmeMdpInstrument.h>

Public Member Functions

 LockGuard (const Instrument *)
 Constructs a guard, locking the given instrument. More...
 
 ~LockGuard ()
 Destructs the guard unlocking instrument. More...
 

Detailed Description

Helper class, provides thread-safe access to Instrument data.

By default it is thread safe to use Instrument methods from InstrumentListener callbacks only. To access Instrument data from arbitrary threads, LockGuard class must be used.
The class is a wrapper that provides RAII style mechanism for locking/unlocking an instrument similar to c++11 std::lock_guard

Constructor & Destructor Documentation

Cme::Mdp::Instrument::LockGuard::LockGuard ( const Instrument )

Constructs a guard, locking the given instrument.

Cme::Mdp::Instrument::LockGuard::~LockGuard ( )

Destructs the guard unlocking instrument.