Bug 679597

Summary: Ruby client fetch() blocks other threads
Product: Red Hat Enterprise MRG Reporter: William Henry <whenry>
Component: qpid-qmfAssignee: Darryl L. Pierce <dpierce>
Status: CLOSED DEFERRED QA Contact: MRG Quality Engineering <mrgqe-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 1.3CC: iboverma, jross, lzhaldyb, sgraf, tross
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-04-30 20:07:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description William Henry 2011-02-22 22:53:23 UTC
Description of problem:

Using a sess.nextReceiver().fetch  causes other threads to be blocked.

A workaround for current implementation is:

     receiver = Cqpid::Receiver.new
     while 1 do
       break if @session.nextReceiver(receiver,Cqpid::Duration.SECOND)
       sleep 0.01
     end
     msg = receiver.fetch()

From Ted:
Ruby 1.9 has a way to say "this function call may block, don't block ruby threads" however for Ruby 1.8, we've got to find a better way to deal with this issue.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 William Henry 2011-03-01 23:21:01 UTC
This issue also causes clients to block signals like CTRL-C.  So when caught in a fetch() blocking call the user can't CTRL-C out of the program.