We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 98d1c80 + f1471e7 commit 7b7b3e2Copy full SHA for 7b7b3e2
lib/concurrent/actor/behaviour/terminates_children.rb
@@ -4,7 +4,7 @@ module Behaviour
4
# Terminates all children when the actor terminates.
5
class TerminatesChildren < Abstract
6
def on_event(event)
7
- children.each { |ch| ch << :terminate! } if event == :terminated
+ children.map { |ch| ch.ask :terminate! }.each(&:wait) if event == :terminated
8
super event
9
end
10
0 commit comments