MLIB
Loading...
Searching...
No Matches
mutex.h
Go to the documentation of this file.
1#pragma once
2
9#include "syncbase.h"
10
11namespace mlib {
12
13class mutex : public syncbase
14{
15public:
16 mutex (const std::string& name = std::string ());
17 operator bool ();
18 void signal ();
19};
20
22inline void mutex::signal ()
23{
24 ReleaseMutex (handle ());
25}
26
27}; // namespace mlib
Wrapper for Windows mutexes.
Definition mutex.h:14
void signal()
Signal the mutex.
Definition mutex.h:22
Base class for all named synchronization objects.
Definition syncbase.h:27
HANDLE handle() const
Return OS handle of this object.
Definition syncbase.h:54
virtual const std::string & name() const
Return object's name.
Definition syncbase.h:60
syncbase class definition.