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

Promise.zip execution changes #654

Merged

Commits on Feb 24, 2018

  1. Do not execute zipped promises

    It's unnecessary to immediately execute promises that are chained
    together with `zip`. This feels like a bug to me, but I'm sure people
    are relying on the old behavior, so this is definitely a breaking
    change.
    davishmcclurg authored and pitr-ch committed Feb 24, 2018
    Copy the full SHA
    641436c View commit details
    Browse the repository at this point in the history
  2. Allow setting executor for zipped promises

    The use case for this is a little strange, since you can set the
    executors for the zipped promises when they're created instead. In my
    case, it would make it easier to run a number of immediately executed
    promises on a pool:
    
    ```
    p1 = Concurrent::Promise.new(executor: :immediate) { ... }
    p2 = Concurrent::Promise.new(executor: :immediate) { ... }
    
    ...
    
    Concurrent::Promise.zip(p1, p2, executor: SOME_THREAD_POOL).then { ... }
    ```
    davishmcclurg authored and pitr-ch committed Feb 24, 2018
    Copy the full SHA
    2e8027a View commit details
    Browse the repository at this point in the history
  3. Add option to not execute zipped promises

    This restores the default behavior for zipped promises and adds an
    option (`execute`) to leave them unscheduled.
    davishmcclurg authored and pitr-ch committed Feb 24, 2018
    Copy the full SHA
    d85aaf3 View commit details
    Browse the repository at this point in the history
  4. Add executor and execute options to zip docs

    David Harsha authored and pitr-ch committed Feb 24, 2018
    Copy the full SHA
    0559cba View commit details
    Browse the repository at this point in the history