You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Alan Conway (JIRA)" <ji...@apache.org> on 2018/04/05 14:46:00 UTC
[jira] [Resolved] (PROTON-1820) [ruby] Container#schedule does not
work if called from handler
[ https://issues.apache.org/jira/browse/PROTON-1820?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alan Conway resolved PROTON-1820.
---------------------------------
Resolution: Fixed
> [ruby] Container#schedule does not work if called from handler
> --------------------------------------------------------------
>
> Key: PROTON-1820
> URL: https://issues.apache.org/jira/browse/PROTON-1820
> Project: Qpid Proton
> Issue Type: Bug
> Components: ruby-binding
> Affects Versions: proton-c-0.22.0
> Reporter: Alan Conway
> Assignee: Alan Conway
> Priority: Major
> Fix For: proton-c-0.23.0
>
>
> The Container#schedule method does not work if called from a handler function.
>
> WORKAROUND: The following monkey-patch can be used to work-around the bug until the fix is released
>
> {code:java}
> require 'qpid_proton'
> # Monkey-patch to fix https://issues.apache.org/jira/browse/PROTON-1820 in proton 0.22
> # The patch will not be needed with proton >= 0.23
> module Qpid::Proton
> module ContainerFix
> def run_one(task, now)
> if task == :schedule
> @lock.synchronize { @active -= 1; check_stop_lh } if maybe_panic { @schedule.process now }
> @lock.synchronize { @schedule_working = false }
> wake
> else
> super
> end
> end
> end
> class Container
> prepend ContainerFix
> end
> end
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org