Sleeping Wombat GUI  0.100
swGUI
ThreadsLatch.h
Go to the documentation of this file.
1 #pragma once
2 
9 
10 
11 #include <mutex>
12 #include <atomic>
13 #include <condition_variable>
14 
15 
16 namespace sw
17 {
18 
19 
20 
26 {
27 private:
28 
29  std::mutex m_lock;
30  std::condition_variable m_condVariable;
32 
33 protected:
34 public:
35  explicit ThreadsLatch ( uint16 numThreads );
36  ~ThreadsLatch () = default;
37 
38 
39  void ArriveAndWait ();
40 };
41 
42 
43 } // sw
44 
45 
ThreadsLatch(uint16 numThreads)
Definition: ThreadsLatch.cpp:18
uint16_t uint16
Definition: TypesDefinitions.h:29
void ArriveAndWait()
Definition: ThreadsLatch.cpp:24
Definition: DirectInputModule.cpp:11
std::condition_variable m_condVariable
Definition: ThreadsLatch.h:30
Plik zawiera definicje podstawowych typów zmiennych.
std::mutex m_lock
Definition: ThreadsLatch.h:29
Can block multiple threads and wait for signal. ThreadsLatch is not reusable. Use ThreadsBarrier inst...
Definition: ThreadsLatch.h:25
~ThreadsLatch()=default
uint16 m_remain
Definition: ThreadsLatch.h:31