Skip to content

Commit 187957e

Browse files
committed
Removed deprecated Runnable methods from TimerTask.
1 parent ad0dd84 commit 187957e

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

lib/concurrent/timer_task.rb

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
require 'concurrent/executor/executor'
55
require 'concurrent/executor/safe_task_executor'
66

7-
# deprecated Updated to use `Executor` instead of `Runnable`
8-
require 'concurrent/runnable'
9-
107
module Concurrent
118

129
# A very common currency pattern is to run a thread that performs a task at regular
@@ -295,32 +292,6 @@ def timeout_interval=(value)
295292
end
296293
end
297294

298-
# @deprecated Updated to use `Executor` instead of `Runnable`
299-
def terminate(*args) deprecated(:terminate, :kill, *args); end
300-
301-
# @deprecated Updated to use `Executor` instead of `Runnable`
302-
def stop(*args) deprecated(:stop, :shutdown, *args); end
303-
304-
# @deprecated Updated to use `Executor` instead of `Runnable`
305-
def cancel(*args) deprecated(:cancel, :shutdown, *args); end
306-
307-
# @deprecated Updated to use `Executor` instead of `Runnable`
308-
def run!(*args) deprecated(:run!, :execute); end
309-
310-
# @deprecated Updated to use `Executor` instead of `Runnable`
311-
def self.run!(*args, &block)
312-
warn "[DEPRECATED] `run!` is deprecated, please use `execute` instead."
313-
Concurrent::Runnable::Context.new(TimerTask.new(*args, &block))
314-
end
315-
316-
# @deprecated Updated to use `Executor` instead of `Runnable`
317-
def run
318-
raise Concurrent::Runnable::LifecycleError.new('already running') if @running.true?
319-
self.execute
320-
self.wait_for_termination
321-
true
322-
end
323-
324295
private :post, :<<
325296

326297
protected
@@ -366,12 +337,5 @@ def timeout_task(completion)
366337
observers.notify_observers(Time.now, nil, Concurrent::TimeoutError.new)
367338
end
368339
end
369-
370-
# @deprecated Updated to use `Executor` instead of `Runnable`
371-
# @!visibility private
372-
def deprecated(old, new, *args)
373-
warn "[DEPRECATED] `#{old}` is deprecated, please use `#{new}` instead."
374-
self.send(new, *args)
375-
end
376340
end
377341
end

0 commit comments

Comments
 (0)