[asterisk-scf-commits] asterisk-scf/integration/ice-util-cpp.git branch "retry_deux" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed Apr 4 09:16:03 CDT 2012


branch "retry_deux" has been updated
       via  46d8699b2aeffd90a51ee7c50e3e2fcd3832fba9 (commit)
      from  84e06c9b0470a8ce38beb6878bc5702c910c7b87 (commit)

Summary of changes:
 include/AsteriskSCF/Operations/OperationMonitor.h |   22 ++++++++++++++------
 1 files changed, 15 insertions(+), 7 deletions(-)


- Log -----------------------------------------------------------------
commit 46d8699b2aeffd90a51ee7c50e3e2fcd3832fba9
Author: Brent Eagles <beagles at digium.com>
Date:   Wed Apr 4 11:45:23 2012 -0230

    Reworded an incorrect and misleading comment as well as added a TODO note
    about  poorly named function.

diff --git a/include/AsteriskSCF/Operations/OperationMonitor.h b/include/AsteriskSCF/Operations/OperationMonitor.h
index 55cfbe2..62e7e25 100755
--- a/include/AsteriskSCF/Operations/OperationMonitor.h
+++ b/include/AsteriskSCF/Operations/OperationMonitor.h
@@ -483,13 +483,21 @@ private:
 };
 
 /** 
- * Simple file scope helper for the "add" methods. The signatures for
- * these methods do not include any kind of results, so we only need
- * to consider exceptions and one method will do for all of that. This
- * function returns true if the caller should proceed with the actual
- * operations or false if it can assume that it has already been done
- * and the results have been obtained (and thrown if necessary in this
- * case)
+ * Simple file scope helper for the "add" methods. The signatures for these
+ * methods do not include any kind of results, so we only need to consider
+ * exceptions and one method will do for all of that. This function is a
+ * kind of do-it-all (or most of it at least). It returns a new ContextData
+ * object if this is the first upcall for the provided context, otherwise
+ * it returns a nil reference. But before it returns a nil reference, it
+ * waits for the first caller to set the completion status either by
+ * setting it to complete or setting an exception. If an exception is set,
+ * that exception is thrown instead of returning the nil reference.
+ *
+ * TODO: the existing function name is poor to the extreme so some thought
+ * needs to go into picking a new one. Also, while I wrote this, I really
+ * dislike the "candy machine" kind of interface. I would prefer that we
+ * find some way to treat the cache atomically from the caller as it may
+ * lead the way for some clearer idioms.
  */
 ASTSCF_DLL_EXPORT ContextDataPtr checkAndThrow(const AsteriskSCF::Operations::OperationContextCachePtr& cache,
     const AsteriskSCF::System::V1::OperationContextPtr& context);

-----------------------------------------------------------------------


-- 
asterisk-scf/integration/ice-util-cpp.git



More information about the asterisk-scf-commits mailing list