Author: remi
Date: 2008-12-13 15:30:43 +0100 (Sat, 13 Dec 2008)
New Revision: 3079

Modified:
   
software_suite_v2/tuxware/pytuxisalive/branches/complete_refactoring/src/tuxisalive/lib/IPN/IPNClient.py
   
software_suite_v2/tuxware/pytuxisalive/branches/complete_refactoring/src/tuxisalive/lib/IPN/IPNServer.py
Log:
* added methods to wait that the client and server has stopped 

Modified: 
software_suite_v2/tuxware/pytuxisalive/branches/complete_refactoring/src/tuxisalive/lib/IPN/IPNClient.py
===================================================================
--- 
software_suite_v2/tuxware/pytuxisalive/branches/complete_refactoring/src/tuxisalive/lib/IPN/IPNClient.py
    2008-12-13 14:16:42 UTC (rev 3078)
+++ 
software_suite_v2/tuxware/pytuxisalive/branches/complete_refactoring/src/tuxisalive/lib/IPN/IPNClient.py
    2008-12-13 14:30:43 UTC (rev 3079)
@@ -164,6 +164,16 @@
         self.__ntlMutex.release()
 
     # 
--------------------------------------------------------------------------
+    # Wait that the client has stopped.
+    # 
--------------------------------------------------------------------------
+    def waitStop(self):
+        """Wait that the client has stopped.
+        """
+        while self.__getRun():
+            time.sleep(0.5)
+        time.sleep(0.5)
+
+    # 
--------------------------------------------------------------------------
     # Clean the closed thread from the threaded messages list.
     # 
--------------------------------------------------------------------------
     def __cleanNotifyThreadList(self):

Modified: 
software_suite_v2/tuxware/pytuxisalive/branches/complete_refactoring/src/tuxisalive/lib/IPN/IPNServer.py
===================================================================
--- 
software_suite_v2/tuxware/pytuxisalive/branches/complete_refactoring/src/tuxisalive/lib/IPN/IPNServer.py
    2008-12-13 14:16:42 UTC (rev 3078)
+++ 
software_suite_v2/tuxware/pytuxisalive/branches/complete_refactoring/src/tuxisalive/lib/IPN/IPNServer.py
    2008-12-13 14:30:43 UTC (rev 3079)
@@ -164,6 +164,16 @@
         self.__clearClients()
 
     # 
--------------------------------------------------------------------------
+    # Wait that the server has stopped.
+    # 
--------------------------------------------------------------------------
+    def waitStop(self):
+        """Wait that the server has stopped.
+        """
+        while self.__getRunLst():
+            time.sleep(0.5)
+        time.sleep(0.5)
+
+    # 
--------------------------------------------------------------------------
     # Get the state of the listening loop.
     # 
--------------------------------------------------------------------------
     def __getRunLst(self):


------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to