diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-11-18 00:05:57 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-11-18 00:05:57 +0000 |
commit | a5e8e088e743c68f22a0554a0c56cf3d2c8faa26 (patch) | |
tree | 895c763423381bc8d438fa4bf352d53bf14bbf26 /libadhocutil/semaphore.h | |
parent | Add missing test for semaphore inital value (diff) | |
download | libadhocutil-a5e8e088e743c68f22a0554a0c56cf3d2c8faa26.tar.bz2 libadhocutil-a5e8e088e743c68f22a0554a0c56cf3d2c8faa26.tar.xz libadhocutil-a5e8e088e743c68f22a0554a0c56cf3d2c8faa26.zip |
Add missing doxygen comments
Diffstat (limited to 'libadhocutil/semaphore.h')
-rw-r--r-- | libadhocutil/semaphore.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libadhocutil/semaphore.h b/libadhocutil/semaphore.h index de10333..3e7e476 100644 --- a/libadhocutil/semaphore.h +++ b/libadhocutil/semaphore.h @@ -12,11 +12,16 @@ namespace AdHoc { /// A portable semaphore with timeout support class DLL_PUBLIC Semaphore { public: + /// Construct a new semaphore with optional initial count. Semaphore(unsigned int initial = 0); + /// Notify one waiting thread. void notify(); + /// Wait for a single count. void wait(); - bool wait(unsigned int); + /// Wait for a single count with timeout. + /// @param ms Timeout in milliseconds. + bool wait(unsigned int ms); private: boost::mutex mutex; |