[asterisk-scf-commits] asterisk-scf/integration/slice.git branch "workqueue" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Mon Mar 7 09:57:59 CST 2011


branch "workqueue" has been updated
       via  c5e324b61fb53d05ccb174e521f523d5e56cc2ae (commit)
      from  ea4cc659bcdb66692356e01cc9244be1c9b98934 (commit)

Summary of changes:
 AsteriskSCF/System/ThreadPool/ThreadPoolIf.ice |   21 ++++-----
 AsteriskSCF/System/WorkQueue/WorkQueueIf.ice   |   54 ++++++++++++------------
 2 files changed, 37 insertions(+), 38 deletions(-)


- Log -----------------------------------------------------------------
commit c5e324b61fb53d05ccb174e521f523d5e56cc2ae
Author: Mark Michelson <mmichelson at digium.com>
Date:   Mon Mar 7 09:56:02 2011 -0600

    * Fix spacing in work queue and thread pool slice files.
    * Get rid of PoolManager interface in thread pool, placing the operations on the Pool itself instead.
    * Add a PoolFactory interface for thread pools.

diff --git a/AsteriskSCF/System/ThreadPool/ThreadPoolIf.ice b/AsteriskSCF/System/ThreadPool/ThreadPoolIf.ice
index e4bcd7a..617e62d 100644
--- a/AsteriskSCF/System/ThreadPool/ThreadPoolIf.ice
+++ b/AsteriskSCF/System/ThreadPool/ThreadPoolIf.ice
@@ -29,23 +29,22 @@ module ThreadPool
 
 module V1
 {
-    
-    local interface PoolManager
-    {
-	void setPoolSize(int size);
-    };
-
     local interface PoolListener
     {
-	void stateChanged(PoolManager manager, int activeThreads, int idleThreads, int zombieThreads);
-	void queueWorkAdded(PoolManager manager, int newWorkCount, bool wasEmpty);
-	void queueEmptied(PoolManager manager);
+        void stateChanged(Pool pool, int activeThreads, int idleThreads, int zombieThreads);
+        void queueWorkAdded(Pool pool, int newWorkCount, bool wasEmpty);
+        void queueEmptied(Pool pool);
     };
 
     local interface Pool
     {
-	void setWorkQueue(AsteriskSCF::System::WorkQueue::V1::Queue queue);
-	void setListener(PoolListener listener);
+        void setSize(int size);
+        AsteriskSCF::System::WorkQueue::V1::Queue getQueue();
+    };
+    
+    local interface PoolFactory
+    {
+        Pool createPool(PoolListener listener, AsteriskSCF::System::Workqueue::V1::Queue queue);
     };
 
 }; /* End of V1 */
diff --git a/AsteriskSCF/System/WorkQueue/WorkQueueIf.ice b/AsteriskSCF/System/WorkQueue/WorkQueueIf.ice
index bd481a9..c6e7cb0 100644
--- a/AsteriskSCF/System/WorkQueue/WorkQueueIf.ice
+++ b/AsteriskSCF/System/WorkQueue/WorkQueueIf.ice
@@ -30,58 +30,58 @@ module V1
     
     local interface QueueListener
     {
-	void workAdded(bool wasEmpty);
-	void emptied();
+        void workAdded(bool wasEmpty);
+        void emptied();
     };
 
     local interface Work
     {
-	void execute();
+        void execute();
     };
 
-    sequence<Work> WorkSeq;
+    local sequence<Work> WorkSeq;
 
     local interface Queue
     {
-	void enqueueWork(Work item);
-	void enqueueWorkSeq(WorkSeq items);
-	void cancelWork(Work item);
+        void enqueueWork(Work item);
+       	void enqueueWorkSeq(WorkSeq items);
+       	void cancelWork(Work item);
 
-	/* return value indicates whether queue contains more work
-	   that can be executed immediately
-	*/
-	bool executeWork();
-	/* this is a snapshot and should only be used as a hint */
-	int workCount();
+        /* return value indicates whether queue contains more work
+       	   that can be executed immediately
+       	*/
+       	bool executeWork();
+       	/* this is a snapshot and should only be used as a hint */
+       	int workCount();
 
         void setListener(QueueListener listener);
     };
 
     enum SuspendableWorkResult
     {
-	Complete,
-	Suspended
+        Complete,
+       	Suspended
     };
 
     local interface SuspendableWork
     {
-	SuspendableWorkResult execute();
+        SuspendableWorkResult execute();
     };
 
-    sequence<SuspendableWork> SuspendableWorkSeq;
+    local sequence<SuspendableWork> SuspendableWorkSeq;
 
     local interface SuspendableQueue
     {
-	void enqueueWork(SuspendableWork item);
-	void enqueueWorkSeq(SuspendableWorkSeq items);
-	void cancelWork(SuspendableWork item);
-
-	/* return value indicates whether queue contains more work
-	   that can be executed immediately
-	*/
-	bool executeWork();
-	/* this is a snapshot and should only be used as a hint */
-	int workCount();
+        void enqueueWork(SuspendableWork item);
+       	void enqueueWorkSeq(SuspendableWorkSeq items);
+       	void cancelWork(SuspendableWork item);
+       
+       	/* return value indicates whether queue contains more work
+       	   that can be executed immediately
+       	*/
+       	bool executeWork();
+       	/* this is a snapshot and should only be used as a hint */
+       	int workCount();
 
         void setListener(QueueListener listener);
     };

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


-- 
asterisk-scf/integration/slice.git



More information about the asterisk-scf-commits mailing list