You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Darryl L. Pierce" <dp...@redhat.com> on 2012/01/24 20:24:23 UTC

Ruby non-blocking I/O review

Wanted to bring a patch set [1] I've got up for review to everbody's
attention. This patch set introduces new code to the public API as well
as Ruby native extensions to allow for using the various blocking I/O
calls without blocking the GIL in the Ruby VM.

The new public APIs include a few command classes that handle the
blocking I/O calls. They include:

qpid::messaging::synchio::Receive
qpid::messaging::synchio::Receiver
qpid::messaging::synchio::Send

Commands run in their own thread and communicate back to any entity
monitoring them via file descriptors.

These commands are also exported via SWIG to our dynamic language
bindings. In the Ruby native extensions, the code takes advantage of
that binding to avoid having to use a C++ compiler to build the
extensions; i.e., instead of accessing the new functionality using C++
code in the extension, it can use the standard Ruby APIs to create
instances as if they were Ruby objects and manipulate them that way.

I'm looking for some feedback on the design, on any missing APIs that
can potentially block the GIL, etc. I have some additional changes I'm
working on now, but would like to get some feedback as I go.

[1] https://reviews.apache.org/r/2828/
-- 
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/