AWS SDK for C++
AWS SDK for C++
Loading...
Searching...
No Matches
Semaphore.h
Go to the documentation of this file.
1
6#pragma once
7
9#include <mutex>
10#include <condition_variable>
11
12namespace Aws
13{
14 namespace Utils
15 {
16 namespace Threading
17 {
19 public:
24 Semaphore(size_t initialCount, size_t maxCount);
28 void WaitOne();
32 void Release();
36 void ReleaseAll();
37 private:
38 size_t m_count;
39 const size_t m_maxCount;
40 std::mutex m_mutex;
41 std::condition_variable m_syncPoint;
42 };
43 }
44 }
45}
#define AWS_CORE_API
Definition: Core_EXPORTS.h:26
Semaphore(size_t initialCount, size_t maxCount)