On Tue, May 08, 2012 at 08:52:32AM -0500, Steve Huston wrote:
> What kind of fd is this? Linux?

Yes. There's a class named Prong that creates a one-way pipe for sending
a notification to the Ruby thread to wake it up. The pipe is created
using the pipe() API, then fcntl() to make the descriptor non-blocking.
 
> The symptom sounds like what would happen if a TCP socket write were done
> and TCP buffered the byte. Setting no-delay on the socket would resolve
> that.

I tried adding O_NDELAY to the flags for the fds and it made no
difference:

flags = ::fcntl(yourHandle, F_GETFL);
if((::fcntl(yourHandle, F_SETFL, flags | O_NONBLOCK | O_NDELAY))== -1)
  throw MessagingException("Unable to make your handle non-blocking.");

-- 
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/

Attachment: pgp9RvsLRYUyV.pgp
Description: PGP signature

Reply via email to