| Summary: | Ruby client fetch() blocks other threads | ||
|---|---|---|---|
| Product: | Red Hat Enterprise MRG | Reporter: | William Henry <whenry> |
| Component: | qpid-qmf | Assignee: | Darryl L. Pierce <dpierce> |
| Status: | CLOSED DEFERRED | QA Contact: | MRG Quality Engineering <mrgqe-bugs> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 1.3 | CC: | 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: | |
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. |
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: