[ https://issues.apache.org/jira/browse/PROTON-752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14223844#comment-14223844 ]
Darryl L. Pierce commented on PROTON-752: ----------------------------------------- The solution in this patch should not block on sends just like receives. The Messenger instance returned by the call to receive_and_call would also send large messages without blocking the GIL and preventing other threads from being able to work in a Ruby application. I played with an additional test that modified passive_recv.rb to take the body of an incoming message and treat it as a filename to send back as a response. I then had the receiver perform some simple work with copious output while the receive thread processed incoming messages. It was able to send large messages without interrupting the output thread. > Ruby: Cproton calls don't unlock the GIL for blocking / long-running > operations > ------------------------------------------------------------------------------- > > Key: PROTON-752 > URL: https://issues.apache.org/jira/browse/PROTON-752 > Project: Qpid Proton > Issue Type: Bug > Components: ruby-binding > Affects Versions: 0.8 > Reporter: Dominic Evans > Assignee: Darryl L. Pierce > Priority: Minor > Attachments: > 0001-PROTON-752-Provide-a-non-blocking-means-to-receive-m.patch > > > Currently the I/O-style calls to the Cproton methods don't unlock the Ruby > GIL, impacting performance as other Threads could be given time on the > interpreter whilst the extension code is running. > Depending on Ruby version this is simply a matter of wrapping the calls in > rb_thread_call_without_gvl (Ruby 2.x +) or rb_thread_blocking_region (Ruby > 1.9.x). On Ruby 1.8 I'm not sure if you can enable this, but its my > understanding that RHEL requires continued support for 1.8, so some #define > work would be needed to perform a no-op on that version. -- This message was sent by Atlassian JIRA (v6.3.4#6332)