Browse Source

Use block reads in the tight loop

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac349@3005 e5f2f494-b856-4b98-b285-d166d9295462
Michal Vaner 14 years ago
parent
commit
00b2fc85ac

+ 3 - 2
src/bin/cmdctl/cmdctl.py.in

@@ -1,6 +1,7 @@
 #!@PYTHON@
 #!@PYTHON@
 
 
 # Copyright (C) 2010  Internet Systems Consortium.
 # Copyright (C) 2010  Internet Systems Consortium.
+# Copyright (C) 2010  CZ NIC
 #
 #
 # Permission to use, copy, modify, and distribute this software for any
 # Permission to use, copy, modify, and distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
 # purpose with or without fee is hereby granted, provided that the above
@@ -320,8 +321,8 @@ class CommandControl():
     def _handle_msg_from_msgq(self):
     def _handle_msg_from_msgq(self):
         '''Process all the received commands with module session. '''
         '''Process all the received commands with module session. '''
         while self._serving:
         while self._serving:
-            self._module_cc.check_command() 
- 
+            self._module_cc.check_command(False)
+
     def _parse_command_result(self, rcode, reply):
     def _parse_command_result(self, rcode, reply):
         '''Ignore the error reason when command rcode isn't 0, '''
         '''Ignore the error reason when command rcode isn't 0, '''
         if rcode != 0:
         if rcode != 0:

+ 2 - 1
src/bin/xfrin/xfrin.py.in

@@ -1,6 +1,7 @@
 #!@PYTHON@
 #!@PYTHON@
 
 
 # Copyright (C) 2010  Internet Systems Consortium.
 # Copyright (C) 2010  Internet Systems Consortium.
+# Copyright (C) 2010  CZ NIC
 #
 #
 # Permission to use, copy, modify, and distribute this software for any
 # Permission to use, copy, modify, and distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
 # purpose with or without fee is hereby granted, provided that the above
@@ -393,7 +394,7 @@ class Xfrin:
         '''This is a straightforward wrapper for cc.check_command, 
         '''This is a straightforward wrapper for cc.check_command, 
         but provided as a separate method for the convenience 
         but provided as a separate method for the convenience 
         of unit tests.'''
         of unit tests.'''
-        self._module_cc.check_command()
+        self._module_cc.check_command(False)
 
 
     def config_handler(self, new_config):
     def config_handler(self, new_config):
         self._max_transfers_in = new_config.get("transfers_in") or self._max_transfers_in
         self._max_transfers_in = new_config.get("transfers_in") or self._max_transfers_in

+ 2 - 1
src/bin/xfrout/xfrout.py.in

@@ -1,6 +1,7 @@
 #!@PYTHON@
 #!@PYTHON@
 
 
 # Copyright (C) 2010  Internet Systems Consortium.
 # Copyright (C) 2010  Internet Systems Consortium.
+# Copyright (C) 2010  CZ NIC
 #
 #
 # Permission to use, copy, modify, and distribute this software for any
 # Permission to use, copy, modify, and distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
 # purpose with or without fee is hereby granted, provided that the above
@@ -491,7 +492,7 @@ class XfroutServer:
     def run(self):
     def run(self):
         '''Get and process all commands sent from cfgmgr or other modules. '''
         '''Get and process all commands sent from cfgmgr or other modules. '''
         while not self._shutdown_event.is_set():
         while not self._shutdown_event.is_set():
-            self._cc.check_command()
+            self._cc.check_command(False)
 
 
 
 
 xfrout_server = None
 xfrout_server = None

+ 2 - 1
src/bin/zonemgr/zonemgr.py.in

@@ -1,6 +1,7 @@
 #!@PYTHON@
 #!@PYTHON@
 
 
 # Copyright (C) 2010  Internet Systems Consortium.
 # Copyright (C) 2010  Internet Systems Consortium.
+# Copyright (C) 2010  CZ NIC
 #
 #
 # Permission to use, copy, modify, and distribute this software for any
 # Permission to use, copy, modify, and distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
 # purpose with or without fee is hereby granted, provided that the above
@@ -485,7 +486,7 @@ class Zonemgr:
 
 
     def run(self):
     def run(self):
         while not self._shutdown_event.is_set():
         while not self._shutdown_event.is_set():
-            self._module_cc.check_command()
+            self._module_cc.check_command(False)
 
 
 zonemgrd = None
 zonemgrd = None