Index: util/synchronization/semaphore.h |
diff --git a/util/synchronization/semaphore.h b/util/synchronization/semaphore.h |
index 8cff205da8682476c32dc7994def7f5bb490d956..ac77cb7cbdf852b91ec5fa61fd9adef56e5d3893 100644 |
--- a/util/synchronization/semaphore.h |
+++ b/util/synchronization/semaphore.h |
@@ -44,8 +44,21 @@ class Semaphore { |
//! Atomically decrements the value of the semaphore by 1. If the new value is |
//! negative, this function blocks and will not return until the semaphore’s |
//! value is incremented to 0 by Signal(). |
+ //! |
+ //! \sa TimedWait() |
void Wait(); |
+ //! \brief Performs a timed wait (or “procure”) operation on the semaphore. |
+ //! |
+ //! \param[in] seconds The maximum number of seconds to wait for the operation |
+ //! to complete. |
+ //! |
+ //! \return `false` if the wait timed out, `true` otherwise. |
+ //! |
+ //! This method is simlar to Wait(), except that the amount of time that it |
+ //! blocks is limited. |
+ bool TimedWait(double seconds); |
+ |
//! \brief Performs the signal (or “post”) operation on the semaphore. |
//! |
//! Atomically increments the value of the semaphore by 1. If the new value is |