Sha256: b7ba8c918cc35a9db94c54439d9a1609aa87a1f9bad1bbd2fc3896f48f350931

Contents?: true

Size: 857 Bytes

Versions: 21

Compression:

Stored size: 857 Bytes

Contents

require 'concurrent/configuration'
require 'concurrent/concern/deprecation'

module Concurrent
  extend Concern::Deprecation

  # [DEPRECATED] Perform the given operation asynchronously after
  # the given number of seconds.
  #
  # @param [Fixnum] seconds the interval in seconds to wait before executing the task
  #
  # @yield the task to execute
  #
  # @return [Concurrent::ScheduledTask] IVar representing the task
  #
  # @see Concurrent::ScheduledTask
  #
  # @deprecated use `ScheduledTask` instead
  def timer(seconds, *args, &block)
    deprecated_method 'Concurrent.timer', 'ScheduledTask'
    raise ArgumentError.new('no block given') unless block_given?
    raise ArgumentError.new('interval must be greater than or equal to zero') if seconds < 0
    Concurrent.global_timer_set.post(seconds, *args, &block)
  end
  module_function :timer
end

Version data entries

21 entries across 19 versions & 5 rubygems

Version Path
logstash-filter-zabbix-0.1.2 vendor/bundle/jruby/1.9/gems/concurrent-ruby-0.9.2-java/lib/concurrent/utility/timer.rb
logstash-filter-zabbix-0.1.1 vendor/bundle/jruby/1.9/gems/concurrent-ruby-0.9.2-java/lib/concurrent/utility/timer.rb
ivanvc-logstash-input-s3-3.1.1.4 vendor/local/gems/concurrent-ruby-0.9.2-java/lib/concurrent/utility/timer.rb
ivanvc-logstash-input-s3-3.1.1.3 vendor/local/gems/concurrent-ruby-0.9.2-java/lib/concurrent/utility/timer.rb
ivanvc-logstash-input-s3-3.1.1.2 vendor/local/gems/concurrent-ruby-0.9.2-java/lib/concurrent/utility/timer.rb
logstash-input-beats-2.0.2 vendor/jruby/1.9/gems/concurrent-ruby-0.9.2-java/lib/concurrent/utility/timer.rb
logstash-input-beats-2.0.2 vendor/jruby/1.9/gems/logstash-codec-json-2.0.3/vendor/gems/concurrent-ruby-0.9.1-java/lib/concurrent/utility/timer.rb
logstash-input-beats-2.0.2 vendor/jruby/1.9/gems/concurrent-ruby-0.9.1-java/lib/concurrent/utility/timer.rb
logstash-codec-json-2.0.3 vendor/gems/concurrent-ruby-0.9.1-java/lib/concurrent/utility/timer.rb
concurrent-ruby-0.9.2-java lib/concurrent/utility/timer.rb
concurrent-ruby-0.9.2 lib/concurrent/utility/timer.rb
logstash-input-beats-0.9.2 vendor/jruby/1.9/gems/concurrent-ruby-0.9.1-java/lib/concurrent/utility/timer.rb
logstash-input-beats-0.9.1 vendor/jruby/1.9/gems/concurrent-ruby-0.9.1-java/lib/concurrent/utility/timer.rb
concurrent-ruby-0.9.1 lib/concurrent/utility/timer.rb
concurrent-ruby-0.9.1-java lib/concurrent/utility/timer.rb
concurrent-ruby-0.9.0 lib/concurrent/utility/timer.rb
concurrent-ruby-0.9.0-java lib/concurrent/utility/timer.rb
concurrent-ruby-0.9.0.pre3-java lib/concurrent/utility/timer.rb
concurrent-ruby-0.9.0.pre3 lib/concurrent/utility/timer.rb
concurrent-ruby-0.9.0.pre2 lib/concurrent/utility/timer.rb