You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2015/02/23 17:42:09 UTC

qpid-proton git commit: PROTON-825: BlockingReceiver.receive() uses 100% CPU.

Repository: qpid-proton
Updated Branches:
  refs/heads/master aa53a6c00 -> 4244875dd


PROTON-825: BlockingReceiver.receive() uses 100% CPU.

Fixed in  BlockingConnection, by setting BlockingConnection's timeout on it's Container.

NOTE: Prior to this fix you can work around the problem as follows:

- self.connection = BlockingConnection(url, timeout=timeout)

+ container = proton.reactor.Container()
+ container.timeout = timeout
+ self.connection = BlockingConnection(url, timeout=timeout, container=container)

Timeout can be None to wait without limit until something is available.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/4244875d
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/4244875d
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/4244875d

Branch: refs/heads/master
Commit: 4244875ddd74f41d67f4fca11166fc6d43bc4d93
Parents: aa53a6c
Author: Alan Conway <ac...@redhat.com>
Authored: Mon Feb 23 11:39:22 2015 -0500
Committer: Alan Conway <ac...@redhat.com>
Committed: Mon Feb 23 11:39:22 2015 -0500

----------------------------------------------------------------------
 proton-c/bindings/python/proton/utils.py | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/4244875d/proton-c/bindings/python/proton/utils.py
----------------------------------------------------------------------
diff --git a/proton-c/bindings/python/proton/utils.py b/proton-c/bindings/python/proton/utils.py
index 00dedcb..a47ffcc 100644
--- a/proton-c/bindings/python/proton/utils.py
+++ b/proton-c/bindings/python/proton/utils.py
@@ -190,6 +190,7 @@ class BlockingConnection(Handler):
     def __init__(self, url, timeout=None, container=None, ssl_domain=None):
         self.timeout = timeout
         self.container = container or Container()
+        self.container.timeout = self.timeout
         self.container.start()
         self.url = Url(utf8(url)).defaults()
         self.conn = self.container.connect(url=self.url, handler=self, ssl_domain=ssl_domain, reconnect=False)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org