Commit f7707668 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Add an XXX when a loop call poll(0).

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1924 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 142e44bd
...@@ -41,6 +41,7 @@ class NeoCTL(object): ...@@ -41,6 +41,7 @@ class NeoCTL(object):
self.connection = ClientConnection(self.em, self.handler, self.connection = ClientConnection(self.em, self.handler,
addr=self.server, connector=self.connector_handler()) addr=self.server, connector=self.connector_handler())
while not self.connected and self.connection is not None: while not self.connected and self.connection is not None:
# XXX: this burn the CPU
self.em.poll(0) self.em.poll(0)
if self.connection is None: if self.connection is None:
raise NotReadyException raise NotReadyException
...@@ -53,6 +54,7 @@ class NeoCTL(object): ...@@ -53,6 +54,7 @@ class NeoCTL(object):
response_queue = self.response_queue response_queue = self.response_queue
assert len(response_queue) == 0 assert len(response_queue) == 0
while len(response_queue) == 0: while len(response_queue) == 0:
# XXX: this burn the CPU
self.em.poll(0) self.em.poll(0)
if not self.connected: if not self.connected:
raise NotReadyException, 'Connection closed' raise NotReadyException, 'Connection closed'
......
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