Skip to content

Commit

Permalink
Fix TimerTask :execution_interval docs
Browse files Browse the repository at this point in the history
This seems to be a mistake in the docs. Looking under the hood at the `ScheduledTask` class, you can see that Float is perfectly fine and can be passed as an execution interval. This PR changes `Integer` to `Float` in the method description to avoid any confusion.

https://github.com/ruby-concurrency/concurrent-ruby/blob/e7ff945661a93a2e094b3259f23ccb1b3eea9bcf/lib/concurrent-ruby/concurrent/scheduled_task.rb#L167
  • Loading branch information
freemanoid authored and eregon committed Apr 24, 2023
1 parent e7ff945 commit 9f40827
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/concurrent-ruby/concurrent/timer_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class TimerTask < RubyExecutorService
#
# @!macro timer_task_initialize
# @param [Hash] opts the options defining task execution.
# @option opts [Integer] :execution_interval number of seconds between
# @option opts [Float] :execution_interval number of seconds between
# task executions (default: EXECUTION_INTERVAL)
# @option opts [Boolean] :run_now Whether to run the task immediately
# upon instantiation or to wait until the first # execution_interval
Expand Down

0 comments on commit 9f40827

Please sign in to comment.