Commit 00b2fc85 authored by Michal Vaner's avatar Michal Vaner
Browse files

Use block reads in the tight loop

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac349@3005 e5f2f494-b856-4b98-b285-d166d9295462
parent 70b4e321
#!@PYTHON@
# Copyright (C) 2010 Internet Systems Consortium.
# Copyright (C) 2010 CZ NIC
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
......@@ -320,8 +321,8 @@ class CommandControl():
def _handle_msg_from_msgq(self):
'''Process all the received commands with module session. '''
while self._serving:
self._module_cc.check_command()
self._module_cc.check_command(False)
def _parse_command_result(self, rcode, reply):
'''Ignore the error reason when command rcode isn't 0, '''
if rcode != 0:
......
#!@PYTHON@
# Copyright (C) 2010 Internet Systems Consortium.
# Copyright (C) 2010 CZ NIC
#
# Permission to use, copy, modify, and distribute this software for any
# 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,
but provided as a separate method for the convenience
of unit tests.'''
self._module_cc.check_command()
self._module_cc.check_command(False)
def config_handler(self, new_config):
self._max_transfers_in = new_config.get("transfers_in") or self._max_transfers_in
......
#!@PYTHON@
# Copyright (C) 2010 Internet Systems Consortium.
# Copyright (C) 2010 CZ NIC
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
......@@ -491,7 +492,7 @@ class XfroutServer:
def run(self):
'''Get and process all commands sent from cfgmgr or other modules. '''
while not self._shutdown_event.is_set():
self._cc.check_command()
self._cc.check_command(False)
xfrout_server = None
......
#!@PYTHON@
# Copyright (C) 2010 Internet Systems Consortium.
# Copyright (C) 2010 CZ NIC
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
......@@ -485,7 +486,7 @@ class Zonemgr:
def run(self):
while not self._shutdown_event.is_set():
self._module_cc.check_command()
self._module_cc.check_command(False)
zonemgrd = None
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment