jdantonio/concurrent-ruby — pull request #45 by jdantonio (2014-04-02 14:01:00+00:00)
Title: Added Concurrent::dataflow_with for explicitly setting the executor.

When the `:executor` option was added to `Future` it changed the fundamental behavior of `Concurrent::dataflow`. That function creates a new `Future` internally but there was no way to explicitly specify an executor for the factory. This caused the tests to break. Because Ruby does not allow for method overloading (and because `*args` and `opts = {}` do not work together in the same method) there was no easy way to add an `:executor` option to `Concurrent::dataflow`.

This PR adds a new `Concurrent::dataflow_with` method that expects an executor as the first argument. The method signature is:

```ruby
def dataflow_with(executor, *inputs, &block)
```

The `Concurrent::dataflow` method now delegates to `Concurrent::dataflow_with` and explicitly passes the global task pool. Subsequently the behavior of `Concurrent::dataflow` remains the same as it was before.

@chrisseaton Since you created `Concurrent::dataflow` can you please take a look at this PR and let me know if it looks OK? The tests are now a little redundant but they cover both functions now.