[asterisk-scf-commits] asterisk-scf/release/ice-util-cpp.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Fri Jun 24 14:59:06 CDT 2011


branch "master" has been updated
       via  77fbd062c219503ed3735918d4c2346a5b9a9d4b (commit)
      from  61a9e819013d5861e6095f8668999645a563f599 (commit)

Summary of changes:
 src/ThreadPool/ThreadPool.cpp          |   24 +++++-------------------
 src/WorkQueue/SuspendableWorkQueue.cpp |    2 +-
 2 files changed, 6 insertions(+), 20 deletions(-)


- Log -----------------------------------------------------------------
commit 77fbd062c219503ed3735918d4c2346a5b9a9d4b
Author: Mark Michelson <mmichelson at digium.com>
Date:   Fri Jun 24 14:58:45 2011 -0500

    Make final adjustments based on comments in CR-ASTSCF-83

diff --git a/src/ThreadPool/ThreadPool.cpp b/src/ThreadPool/ThreadPool.cpp
index ac9aff3..f85ed1c 100644
--- a/src/ThreadPool/ThreadPool.cpp
+++ b/src/ThreadPool/ThreadPool.cpp
@@ -144,15 +144,12 @@ public:
         WorkerThreadPtr mWorkerThread;
     };
 
-    typedef IceUtil::Handle<ActiveThreadIdle> ActiveThreadIdlePtr;
-
     void activeThreadIdle(WorkerThreadPtr thread)
     {
         boost::lock_guard<boost::mutex> lock(mQueueLock);
         if (!mShuttingDown)
         {
-            ActiveThreadIdlePtr task(new ActiveThreadIdle(thread, this));
-            mControlQueue->enqueueWork(task);
+            mControlQueue->enqueueWork(new ActiveThreadIdle(thread, this));
         }
     }
 
@@ -184,15 +181,12 @@ public:
         WorkerThreadPtr mWorkerThread;
     };
 
-    typedef IceUtil::Handle<ZombieThreadDead> ZombieThreadDeadPtr;
-    
     void zombieThreadDead(WorkerThreadPtr thread)
     {
         boost::lock_guard<boost::mutex> lock(mQueueLock);
         if (!mShuttingDown)
         {
-            ZombieThreadDeadPtr task(new ZombieThreadDead(thread, this));
-            mControlQueue->enqueueWork(task);
+            mControlQueue->enqueueWork(new ZombieThreadDead(thread, this));
         }
     }
 
@@ -285,15 +279,12 @@ public:
         ThreadPool *mPriv;
     };
 
-    typedef IceUtil::Handle<Resize> ResizePtr;
-
     void resize(int numThreads)
     {
         boost::lock_guard<boost::mutex> lock(mQueueLock);
         if (!mShuttingDown)
         {
-            ResizePtr task(new Resize(numThreads, this));
-            mControlQueue->enqueueWork(task);
+            mControlQueue->enqueueWork(new Resize(numThreads, this));
         }
     }
 
@@ -330,15 +321,13 @@ public:
         ThreadPool *mPool;
     };
 
-    typedef IceUtil::Handle<WorkAdded> WorkAddedPtr;
 
     void handleWorkAdded(Ice::Long numNewWork, bool wasEmpty)
     {
         boost::lock_guard<boost::mutex> lock(mQueueLock);
         if (!mShuttingDown)
         {
-            WorkAddedPtr task(new WorkAdded(numNewWork, wasEmpty, this));
-            mControlQueue->enqueueWork(task);
+            mControlQueue->enqueueWork(new WorkAdded(numNewWork, wasEmpty, this));
         }
     }
 
@@ -362,15 +351,12 @@ public:
         ThreadPool *mPool;
     };
 
-    typedef IceUtil::Handle<Emptied> EmptiedPtr;
-
     void handleEmptied()
     {
         boost::lock_guard<boost::mutex> lock(mQueueLock);
         if (!mShuttingDown)
         {
-            EmptiedPtr task(new Emptied(this));
-            mControlQueue->enqueueWork(task);
+            mControlQueue->enqueueWork(new Emptied(this));
         }
     }
 
diff --git a/src/WorkQueue/SuspendableWorkQueue.cpp b/src/WorkQueue/SuspendableWorkQueue.cpp
index 771adc0..c0cafde 100644
--- a/src/WorkQueue/SuspendableWorkQueue.cpp
+++ b/src/WorkQueue/SuspendableWorkQueue.cpp
@@ -205,7 +205,7 @@ public:
         }
 
         // If the workResumable notification is received and the
-        // state of things was not suspended, then that must mean
+        // Queue was not in the Suspended state, then that must mean
         // that suspended work completed and this listener was notified
         // before the queue could move past the step of executing
         // work and on to the step of marking the work as Suspended.

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


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



More information about the asterisk-scf-commits mailing list