Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BugFix: ConcurrencyStrategy.wrapCallable was not being used on callbacks #190

Merged
merged 1 commit into from
Oct 2, 2013
Merged

BugFix: ConcurrencyStrategy.wrapCallable was not being used on callbacks #190

merged 1 commit into from
Oct 2, 2013

Commits on Oct 1, 2013

  1. BugFix: ConcurrencyStrategy.wrapCallable was not being used for react…

    …ive event-loop threads.
    
    The Rx Scheduler now correctly has state transferred to it with ConcurrencyStrategy.wrapCallable.
    
    Note that if the Rx sequence ever migrates to another thread (such as using observeOn) it is up to the user to deal with this as Hystrix loses control of the flow at that point.
    
    This change does ensure though that the initial threads the callbacks are performed on has the expected thread context.
    
    The design of this code is not very elegant and uses a workaround similar to posting variables on a stack before a method uses them. I have used this approach because I do not want to add a 'wrapFunc2' method to the ConcurrencyStrategy as the use of Func2 is just an implementation detail internally and the users of the library should not have to replicate the effort for both Callable and Func2. Thus the internal code is a little odd but the public API is untouched.
    benjchristensen committed Oct 1, 2013
    Configuration menu
    Copy the full SHA
    770d6a7 View commit details
    Browse the repository at this point in the history