summaryrefslogtreecommitdiff
path: root/ace/Synch.h
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>2001-10-04 21:44:23 +0000
committerSteve Huston <shuston@riverace.com>2001-10-04 21:44:23 +0000
commit1692601730b0c56f52e7496d2e3dd85d2ac427c7 (patch)
tree2a89d77df7ebd689c3a128bc0ede29e4d769ad79 /ace/Synch.h
parent01f58e13d78aa60ecfd46e37d16ce5fd178cad75 (diff)
downloadATCD-1692601730b0c56f52e7496d2e3dd85d2ac427c7.tar.gz
ChangeLogTag:Thu Oct 4 17:38:21 2001 Steve Huston <shuston@riverace.com>
Diffstat (limited to 'ace/Synch.h')
-rw-r--r--ace/Synch.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/ace/Synch.h b/ace/Synch.h
index cdcd0e0ff09..20d7ea972c7 100644
--- a/ace/Synch.h
+++ b/ace/Synch.h
@@ -304,6 +304,18 @@ private:
*
* @brief Implement a do nothing <ACE_Semaphore>, i.e., all the methods are
* no ops.
+ *
+ * Although the methods are no-ops, the return values are different for
+ * the blocking as opposed to timed acquires. The blocking version of
+ * acquire() is often used to serialize access to a critical section,
+ * whereas the timed version is often used to wait for another thread
+ * to update some condition or change some shared state. When using an
+ * ACE_Null_Semaphore, however, there's no other thread involved to
+ * change a state or condition (otherwise, a null semaphore would be
+ * inappropriate). Returning an error value signifies that the
+ * state or condition has not been (and can't be) changed, which is
+ * consistent with the behavior of the threaded case where a timeout
+ * occurs before the state or condition is changed.
*/
class ACE_Export ACE_Null_Semaphore
{