@@ -10,7 +10,7 @@ module Concurrent
1010 # intervals. The thread that performs the task sleeps for the given interval then
1111 # wakes up and performs the task. Lather, rinse, repeat... This pattern causes two
1212 # problems. First, it is difficult to test the business logic of the task because the
13- # task itself is tightly coupled with the concurrency logic. Second, an exception in
13+ # task itself is tightly coupled with the concurrency logic. Second, an exception
1414 # raised while performing the task can cause the entire thread to abend. In a
1515 # long-running application where the task thread is intended to run for days/weeks/years
1616 # a crashed task thread can pose a significant problem. `TimerTask` alleviates both problems.
@@ -23,13 +23,13 @@ module Concurrent
2323 # performing logging or ancillary operations. `TimerTask` can also be configured with a
2424 # timeout value allowing it to kill a task that runs too long.
2525 #
26- # One other advantage of `TimerTask` is it forces the business logic to be completely decoupled
26+ # One other advantage of `TimerTask` is that it forces the business logic to be completely decoupled
2727 # from the concurrency logic. The business logic can be tested separately then passed to the
2828 # `TimerTask` for scheduling and running.
2929 #
3030 # In some cases it may be necessary for a `TimerTask` to affect its own execution cycle.
31- # To facilitate this a reference to the task object is passed into the block as a block
32- # argument every time the task is executed.
31+ # To facilitate this, a reference to the TimerTask instance is passed as an argument
32+ # to the provided block every time the task is executed.
3333 #
3434 # The `TimerTask` class includes the `Dereferenceable` mixin module so the result of
3535 # the last execution is always available via the `#value` method. Derefencing options
@@ -39,7 +39,7 @@ module Concurrent
3939 # `TimerTask` supports notification through the Ruby standard library
4040 # {http://ruby-doc.org/stdlib-2.0/libdoc/observer/rdoc/Observable.html Observable}
4141 # module. On execution the `TimerTask` will notify the observers
42- # with threes arguments: time of execution, the result of the block (or nil on failure),
42+ # with three arguments: time of execution, the result of the block (or nil on failure),
4343 # and any raised exceptions (or nil on success). If the timeout interval is exceeded
4444 # the observer will receive a `Concurrent::TimeoutError` object as the third argument.
4545 #
0 commit comments