The Order Book Edge

The Order Book Edge

A C++ multi thread safe singleton example with source code has been posted

C++, multi thread, safe, singleton, example , source code

The Order Book Edge's avatar
The Order Book Edge
Jun 15, 2010
∙ Paid

Lock.h

//Example from http://www.relisoft.com/Win32/active.html #if !defined _LOCK_H_ #define _LOCK_H_

#include "Mutex.h"

class Lock { public: // Acquire the state of the semaphore Lock ( Mutex & mutex ) : _mutex(mutex) { _mutex.Acquire(); } // Release the state of the semaphore ~Lock () { _mutex.Release(); } private: Mutex & _mutex; };

#endif

Mutex.h

//Examp…

User's avatar

Continue reading this post for free, courtesy of The Order Book Edge.

Or purchase a paid subscription.
© 2026 QuantLabs.net · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture