Author: remi
Date: 2009-05-01 10:31:14 +0200 (Fri, 01 May 2009)
New Revision: 4603

Modified:
   
softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/filesystem/DirectoryContentObserver.py
Log:
* improved directory observation cycle

Modified: 
softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/filesystem/DirectoryContentObserver.py
===================================================================
--- 
softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/filesystem/DirectoryContentObserver.py
    2009-04-30 07:32:49 UTC (rev 4602)
+++ 
softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/filesystem/DirectoryContentObserver.py
    2009-05-01 08:31:14 UTC (rev 4603)
@@ -271,7 +271,12 @@
         """
         while self.isStarted():
             self.__checkForUpdate()
-            time.sleep(self.__rate)
+            m = int(self.__rate / 0.1)
+            for i in range(m):
+                if self.isStarted():
+                    time.sleep(0.1)
+                else:
+                    return
 
 # 
------------------------------------------------------------------------------
 # Program entry point for example.


------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to