Skip to content

Commit e8ce9ad

Browse files
committed
Fixed dataflow (broken when executor option added to Future)
1 parent 55d1db8 commit e8ce9ad

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lib/concurrent/dataflow.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def dataflow(*inputs, &block)
6464
raise ArgumentError.new('no block given') unless block_given?
6565
raise ArgumentError.new('not all dependencies are IVars') unless inputs.all? { |input| input.is_a? IVar }
6666

67-
result = Future.new(executor: PerThreadExecutor.new) do
67+
result = Future.new do
6868
values = inputs.map { |input| input.value }
6969
block.call(*values)
7070
end

spec/spec_helper.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
end
2828

2929
config.before(:each) do
30+
Concurrent.configure do |config|
31+
config.global_task_pool = Concurrent::FixedThreadPool.new(5)
32+
config.global_operation_pool = Concurrent::FixedThreadPool.new(5)
33+
end
3034
end
3135

3236
config.after(:each) do

0 commit comments

Comments
 (0)