Sleeping Wombat Common Library  0.50.0
swCommonLibrary
ThreadsLatch.h
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;
31  uint16 m_remain;
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 
Definition: Exception.h:11
Plik zawiera definicje podstawowych typów zmiennych.
Can block multiple threads and wait for signal. ThreadsLatch is not reusable. Use ThreadsBarrier inst...
Definition: ThreadsLatch.h:25