]> git.tdb.fi Git - libs/core.git/blob - source/core/semaphore.h
Make sure all classes have sensible copy semantics
[libs/core.git] / source / core / semaphore.h
1 #ifndef MSP_CORE_SEMAPHORE_H_
2 #define MSP_CORE_SEMAPHORE_H_
3
4 #include <msp/time/timedelta.h>
5 #include "noncopyable.h"
6
7 namespace Msp {
8
9 class Semaphore: private NonCopyable
10 {
11 private:
12         struct Private;
13
14         Private *priv;
15
16 public:
17         Semaphore(unsigned);
18         ~Semaphore();
19
20         void signal();
21         void wait();
22         bool wait(const Time::TimeDelta &);
23 };
24
25 }
26
27 #endif