[rhmessaging-commits] rhmessaging commits: r3052 - mgmt/trunk/mint/python/mint.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Mon Jan 19 11:29:37 EST 2009


Author: justi9
Date: 2009-01-19 11:29:37 -0500 (Mon, 19 Jan 2009)
New Revision: 3052

Modified:
   mgmt/trunk/mint/python/mint/__init__.py
   mgmt/trunk/mint/python/mint/tools.py
Log:
More carefully target the thread-switching mod

Modified: mgmt/trunk/mint/python/mint/__init__.py
===================================================================
--- mgmt/trunk/mint/python/mint/__init__.py	2009-01-19 16:07:48 UTC (rev 3051)
+++ mgmt/trunk/mint/python/mint/__init__.py	2009-01-19 16:29:37 UTC (rev 3052)
@@ -20,9 +20,6 @@
 
 log = logging.getLogger("mint")
 
-# get better thread switching performance
-sys.setcheckinterval(200)
-
 thisModule = __import__(__name__)
 
 for item in dir(schema):

Modified: mgmt/trunk/mint/python/mint/tools.py
===================================================================
--- mgmt/trunk/mint/python/mint/tools.py	2009-01-19 16:07:48 UTC (rev 3051)
+++ mgmt/trunk/mint/python/mint/tools.py	2009-01-19 16:29:37 UTC (rev 3052)
@@ -96,11 +96,14 @@
     def init(self):
         super(MintServerTool, self).init()
 
+        # get better thread switching performance
+        sys.setcheckinterval(200)
+
     def do_run(self, opts, args, model):
         model.check()
         model.init()
         model.start()
-        
+
         try:
             for arg in args[1:]:
                 model.addBroker(arg)
@@ -120,9 +123,9 @@
         model.check()
         model.init()
         model.start()
-        
+
         added = list()
-        
+
         try:
             for arg in args[1:]:
                 added.append(model.addBroker(arg))
@@ -142,6 +145,9 @@
     def init(self):
         super(MintBenchTool, self).init()
 
+        # get better thread switching performance
+        sys.setcheckinterval(200)
+
     def do_run(self, opts, args, model):
         model.pollRegistrations = False
 
@@ -150,7 +156,7 @@
         model.start()
 
         added = list()
-        
+
         try:
             for arg in args[1:]:
                 added.append(model.addBroker(arg))




More information about the rhmessaging-commits mailing list