Skip to content

Commit 9ef48e3

Browse files
committed
Fixed stuff I broke while refactoting OptionsParser.
1 parent b421874 commit 9ef48e3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/concurrent/executor/timer_set.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ module Concurrent
99
# monitors the set and schedules each task for execution at the appropriate
1010
# time. Tasks are run on the global task pool or on the supplied executor.
1111
class TimerSet
12+
include OptionsParser
1213

1314
# Create a new set of timed tasks.
1415
#
@@ -22,7 +23,7 @@ def initialize(opts = {})
2223
@mutex = Mutex.new
2324
@shutdown = Event.new
2425
@queue = PriorityQueue.new(order: :min)
25-
@executor = OptionsParser::get_executor_from(opts)
26+
@executor = get_executor_from(opts)
2627
@thread = nil
2728
end
2829

@@ -142,7 +143,7 @@ def check_processing_thread!
142143
@thread.wakeup
143144
elsif @thread.nil? || ! @thread.alive?
144145
@thread = Thread.new do
145-
Thread.current.abort_on_exception = false
146+
Thread.current.abort_on_exception = true
146147
process_tasks
147148
end
148149
end

lib/concurrent/options_parser.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,5 @@ def get_executor_from(opts = {})
2020
Concurrent.configuration.global_task_pool
2121
end
2222
end
23-
module_function :get_executor_from
2423
end
2524
end

spec/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].each { |f| require File.expand_path(f) }
2222

2323
RSpec.configure do |config|
24-
#config.order = 'random'
24+
config.order = 'random'
2525

2626
config.before(:suite) do
2727
end

0 commit comments

Comments
 (0)