Skip to content

Commit 1f196b6

Browse files
committed
Pass the executor to the child in Promise#flat_map
1 parent e7f8ab3 commit 1f196b6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/concurrent/promise.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ def rescue(&block)
120120
# @return [Promise]
121121
def flat_map(&block)
122122
child = Promise.new(
123-
parent: self
123+
parent: self,
124+
executor: @executor,
124125
)
125126

126127
on_error { |e| child.on_reject(e) }

0 commit comments

Comments
 (0)