AWS SDK for C++  1.9.132
AWS SDK for C++
Semaphore.h
Go to the documentation of this file.
1 
6 #pragma once
7 
9 #include <mutex>
10 #include <condition_variable>
11 
12 namespace 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 }
AWS_CORE_API
#define AWS_CORE_API
Definition: Core_EXPORTS.h:25
Aws::Utils::Threading::Semaphore
Definition: Semaphore.h:18
Aws::Utils::Threading::Semaphore::Semaphore
Semaphore(size_t initialCount, size_t maxCount)
Aws::Utils::Threading::Semaphore::WaitOne
void WaitOne()
Core_EXPORTS.h
Aws::Utils::Threading::Semaphore::ReleaseAll
void ReleaseAll()
Aws
Definition: AccessManagementClient.h:15
Aws::Utils::Threading::Semaphore::Release
void Release()