From 349055b47d3a65318c480860b427e27024c41822 Mon Sep 17 00:00:00 2001 From: schmidt Date: Mon, 5 Jul 1999 17:23:07 +0000 Subject: ChangeLogTag:Mon Jul 5 11:59:49 1999 Douglas C. Schmidt --- ace/Future.h | 52 +++++++++++++++++++++++++--------------------------- 1 file changed, 25 insertions(+), 27 deletions(-) (limited to 'ace/Future.h') diff --git a/ace/Future.h b/ace/Future.h index cdde4c0a958..b1f71527f63 100644 --- a/ace/Future.h +++ b/ace/Future.h @@ -97,33 +97,6 @@ class ACE_Future_Rep private: friend class ACE_Future; - // Create, attach, detach and assign encapsulates the reference - // count handling and the object lifetime of ACE_Future_Rep - // instances. - - static ACE_Future_Rep *create (void); - // Create a ACE_Future_Rep and initialize the reference count. - - static ACE_Future_Rep *attach (ACE_Future_Rep *&rep); - // Increase the reference count and return argument. Uses the - // attribute "value_ready_mutex_" to synchronize reference count - // updating. - // - // Precondition(rep != 0). - - static void detach (ACE_Future_Rep *&rep); - // Decreases the reference count and and deletes rep if there are no - // more references to rep. - // - // Precondition(rep != 0) - - static void assign (ACE_Future_Rep *&rep, - ACE_Future_Rep *new_rep); - // Decreases the rep's reference count and and deletes rep if there - // are no more references to rep. Then assigns new_rep to rep. - // - // Precondition(rep != 0 && new_rep != 0) - int set (const T &r, ACE_Future &caller); // Set the result value. The specified represents the @@ -164,6 +137,31 @@ private: // separates the error value from the result, and also permits // timeouts. + // = Handle reference counting and object lifetime for ACE_Future_Rep. + + static ACE_Future_Rep *create (void); + // Create a ACE_Future_Rep and initialize the reference count. + + static ACE_Future_Rep *attach (ACE_Future_Rep *&rep); + // Increase the reference count and return argument. Uses the + // attribute "value_ready_mutex_" to synchronize reference count + // updating. + // + // Precondition(rep != 0). + + static void detach (ACE_Future_Rep *&rep); + // Decreases the reference count and and deletes rep if there are no + // more references to rep. + // + // Precondition(rep != 0) + + static void assign (ACE_Future_Rep *&rep, + ACE_Future_Rep *new_rep); + // Decreases the rep's reference count and and deletes rep if there + // are no more references to rep. Then assigns new_rep to rep. + // + // Precondition(rep != 0 && new_rep != 0) + void dump (void) const; // Dump the state of an object. -- cgit v1.2.1