@@ -65,7 +65,7 @@ def wait
6565 # Interrupt all running processes.
6666 # This resumes the controlling fiber with an instance of {Interrupt}.
6767 def interrupt
68- Console . debug ( self , "Sending interrupt to #{ @running . size } running processes..." )
68+ Console . info ( self , "Sending interrupt to #{ @running . size } running processes..." )
6969 @running . each_value do |fiber |
7070 fiber . resume ( Interrupt )
7171 end
@@ -74,7 +74,7 @@ def interrupt
7474 # Terminate all running processes.
7575 # This resumes the controlling fiber with an instance of {Terminate}.
7676 def terminate
77- Console . debug ( self , "Sending terminate to #{ @running . size } running processes..." )
77+ Console . info ( self , "Sending terminate to #{ @running . size } running processes..." )
7878 @running . each_value do |fiber |
7979 fiber . resume ( Terminate )
8080 end
@@ -83,6 +83,7 @@ def terminate
8383 # Stop all child processes using {#terminate}.
8484 # @parameter timeout [Boolean | Numeric | Nil] If specified, invoke a graceful shutdown using {#interrupt} first.
8585 def stop ( timeout = 1 )
86+ Console . info ( self , "Stopping all processes..." , timeout : timeout )
8687 # Use a default timeout if not specified:
8788 timeout = 1 if timeout == true
8889
@@ -105,7 +106,7 @@ def stop(timeout = 1)
105106 end
106107
107108 # Terminate all children:
108- self . terminate
109+ self . terminate if any?
109110
110111 # Wait for all children to exit:
111112 self . wait
0 commit comments