File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ def shutdown?
63
63
# thread pool is not running.
64
64
def shutdown
65
65
mutex . synchronize do
66
- return unless running?
66
+ break unless running?
67
67
stop_event . set
68
68
shutdown_execution
69
69
end
@@ -76,7 +76,7 @@ def shutdown
76
76
# not running.
77
77
def kill
78
78
mutex . synchronize do
79
- return if shutdown?
79
+ break if shutdown?
80
80
stop_event . set
81
81
kill_execution
82
82
stopped_event . set
@@ -93,8 +93,8 @@ def kill
93
93
# @param [Integer] timeout the maximum number of seconds to wait for shutdown to complete
94
94
#
95
95
# @return [Boolean] `true` if shutdown complete or false on `timeout`
96
- def wait_for_termination ( timeout )
97
- stopped_event . wait ( timeout . to_f )
96
+ def wait_for_termination ( timeout = nil )
97
+ stopped_event . wait ( timeout )
98
98
end
99
99
100
100
protected
You can’t perform that action at this time.
0 commit comments