Bug 679597 - Ruby client fetch() blocks other threads
Summary: Ruby client fetch() blocks other threads
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-qmf
Version: 1.3
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Darryl L. Pierce
QA Contact: MRG Quality Engineering
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-22 22:53 UTC by William Henry
Modified: 2015-06-22 00:07 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-04-30 20:07:08 UTC
Target Upstream Version:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.