Piotr Kliczewski has posted comments on this change. Change subject: xmlrpc: do not block forever when waiting on incoming messages ......................................................................
Patch Set 4: (3 comments) https://gerrit.ovirt.org/#/c/42915/4/lib/vdsm/xmlrpc.py File lib/vdsm/xmlrpc.py: Line 121 Line 122 Line 123 Line 124 Line 125 > Also lets minimize the changes by not renaming here self.queue to self._req Done Line 123: Line 124: def __init__(self, RequestHandlerClass): Line 125: super(ConnectedTCPServer, self).__init__(None, RequestHandlerClass, Line 126: bind_and_activate=False) Line 127: self._lock = threading.RLock() > We don't need the lock, TaskQueue is already thread safe. Done Line 128: self._requests = TaskQueue(sys.maxint) Line 129: Line 130: def add(self, connected_socket, socket_address): Line 131: with self._lock: Line 124: def __init__(self, RequestHandlerClass): Line 125: super(ConnectedTCPServer, self).__init__(None, RequestHandlerClass, Line 126: bind_and_activate=False) Line 127: self._lock = threading.RLock() Line 128: self._requests = TaskQueue(sys.maxint) > Do we really want to allow 2**31 queued taks?! Done Line 129: Line 130: def add(self, connected_socket, socket_address): Line 131: with self._lock: Line 132: self._requests.put((connected_socket, socket_address)) -- To view, visit https://gerrit.ovirt.org/42915 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I295e3099ea06d786741164e1f240f4662631bf8a Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Piotr Kliczewski <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Piotr Kliczewski <[email protected]> Gerrit-Reviewer: Yaniv Bronhaim <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
