Sleeping Wombat Common Library
0.50.0
swCommonLibrary
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
Common
Multithreading
Semaphore.h
1
#pragma once
2
11
#include "
swCommonLib/Common/TypesDefinitions.h
"
12
13
#include <mutex>
14
#include <condition_variable>
15
16
17
namespace
sw
18
{
19
20
21
26
class
Semaphore
27
{
28
private
:
29
30
std::mutex m_lock;
31
std::condition_variable m_condVariable;
32
Size m_count;
33
34
public
:
35
36
explicit
Semaphore
( Size initCount )
37
: m_count( initCount )
38
{}
39
40
void
Down ();
41
bool
TryDown ();
42
void
Up ();
43
44
};
45
46
47
48
}
// sw
49
sw
Definition:
Exception.h:11
TypesDefinitions.h
Plik zawiera definicje podstawowych typów zmiennych.
sw::Semaphore
Semaphore class.
Definition:
Semaphore.h:26
Generated on Thu May 31 2018 19:55:59 for Sleeping Wombat Common Library by
1.8.9.1