Skip to content

Commit 9f40827

Browse files
freemanoideregon
authored andcommitted
Fix TimerTask :execution_interval docs
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
1 parent e7ff945 commit 9f40827

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/concurrent-ruby/concurrent/timer_task.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ class TimerTask < RubyExecutorService
159159
#
160160
# @!macro timer_task_initialize
161161
# @param [Hash] opts the options defining task execution.
162-
# @option opts [Integer] :execution_interval number of seconds between
162+
# @option opts [Float] :execution_interval number of seconds between
163163
# task executions (default: EXECUTION_INTERVAL)
164164
# @option opts [Boolean] :run_now Whether to run the task immediately
165165
# upon instantiation or to wait until the first # execution_interval

0 commit comments

Comments
 (0)