@@ -9,7 +9,7 @@ module Concurrent
99 # queue of length one, or a special kind of mutable variable.
1010 #
1111 # On top of the fundamental `#put` and `#take` operations, we also provide a
12- # `#mutate ` that is atomic with respect to operations on the same instance.
12+ # `#modify ` that is atomic with respect to operations on the same instance.
1313 # These operations all support timeouts.
1414 #
1515 # We also support non-blocking operations `#try_put!` and `#try_take!`, a
@@ -87,7 +87,7 @@ def borrow(timeout = nil)
8787 @mutex . synchronize do
8888 wait_for_full ( timeout )
8989
90- # if we timeoud out we'll still be empty
90+ # If we timed out we'll still be empty
9191 if unlocked_full?
9292 yield @value
9393 else
@@ -116,10 +116,10 @@ def put(value, timeout = nil)
116116 end
117117
118118 # Atomically `take`, yield the value to a block for transformation, and then
119- # `put` the transformed value. Returns the transformed value. A timeout can
119+ # `put` the transformed value. Returns the pre-transform value. A timeout can
120120 # be set to limit the time spent blocked, in which case it returns `TIMEOUT`
121121 # if the time is exceeded.
122- # @return [Object] the transformed value, or `TIMEOUT`
122+ # @return [Object] the pre-transform value, or `TIMEOUT`
123123 def modify ( timeout = nil )
124124 raise ArgumentError . new ( 'no block given' ) unless block_given?
125125
0 commit comments