Skip to content

Commit 5406c1c

Browse files
committed
Concurrent.global_* should raise if there is an exception and not return nil
1 parent 25fcd99 commit 5406c1c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/concurrent-ruby/concurrent/configuration.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,14 @@ def self.disable_at_exit_handlers!
136136
#
137137
# @return [ThreadPoolExecutor] the thread pool
138138
def self.global_fast_executor
139-
GLOBAL_FAST_EXECUTOR.value
139+
GLOBAL_FAST_EXECUTOR.value!
140140
end
141141

142142
# Global thread pool optimized for long, blocking (IO) *tasks*.
143143
#
144144
# @return [ThreadPoolExecutor] the thread pool
145145
def self.global_io_executor
146-
GLOBAL_IO_EXECUTOR.value
146+
GLOBAL_IO_EXECUTOR.value!
147147
end
148148

149149
def self.global_immediate_executor
@@ -154,7 +154,7 @@ def self.global_immediate_executor
154154
#
155155
# @return [Concurrent::TimerSet] the thread pool
156156
def self.global_timer_set
157-
GLOBAL_TIMER_SET.value
157+
GLOBAL_TIMER_SET.value!
158158
end
159159

160160
# General access point to global executors.

0 commit comments

Comments
 (0)