There was a JIRA  opened recently concerning blocking calls in the Ruby bindings, and asking for a means to release the global interpreter lock for such calls.
The first issue to deal with is to provide a solution that would work on both Ruby 1.8 and Ruby 1.9/2.0. In the latter case we have the rb_thread_blocking_region()  Ruby API that can be used to mark a method as blocking in order to release the GIL for a period of time. However, there is no equivalent method in Ruby 1.8. But what there is available in Ruby 1.8+ is the ability to wait on a file descriptor. But this ability is also already exposed in the Ruby bindings themselves using passive mode  to avoid the call to Messenger.receive blocking the interpreter. It strikes me that the solution should leverage the passive mode capabilities of the underlying C code. After all, that's it's raison d'etre, to make it possible in bindings to write non-blocking code code. Thoughts? Ideas?  http://issues.apache.org/jira/browse/PROTON-752  http://tinyurl.com/naxtdfw  http://issues.apache.org/jira/browse/PROTON-531 -- Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc. Delivering value year after year. Red Hat ranks #1 in value among software vendors. http://www.redhat.com/promo/vendor/
Description: PGP signature