Skip to content

Commit 226aeec

Browse files
authored
Merge pull request #826 from boone/fix_docs
Doc Fixes
2 parents a917df7 + 6db910e commit 226aeec

File tree

4 files changed

+14
-19
lines changed

4 files changed

+14
-19
lines changed

lib-edge/concurrent/actor/reference.rb

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,7 @@ def tell(message)
3535

3636
alias_method :<<, :tell
3737

38-
# @note it's a good practice to use tell whenever possible. Ask should be used only for
39-
# testing and when it returns very shortly. It can lead to deadlock if all threads in
40-
# global_io_executor will block on while asking. It's fine to use it form outside of actors and
41-
# global_io_executor.
42-
#
43-
# @note it's a good practice to use {#tell} whenever possible. Results can be send back with other messages.
38+
# @note it's a good practice to use {#tell} whenever possible. Results can be sent back with other messages.
4439
# Ask should be used only for testing and when it returns very shortly. It can lead to deadlock if all threads in
4540
# global_io_executor will block on while asking. It's fine to use it form outside of actors and
4641
# global_io_executor.
@@ -61,7 +56,7 @@ def ask(message, future = Concurrent::Promises.resolvable_future)
6156
# Sends the message synchronously and blocks until the message
6257
# is processed. Raises on error.
6358
#
64-
# @note it's a good practice to use {#tell} whenever possible. Results can be send back with other messages.
59+
# @note it's a good practice to use {#tell} whenever possible. Results can be sent back with other messages.
6560
# Ask should be used only for testing and when it returns very shortly. It can lead to deadlock if all threads in
6661
# global_io_executor will block on while asking. It's fine to use it form outside of actors and
6762
# global_io_executor.

lib/concurrent/array.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ module Concurrent
1010
# or writing at a time. This includes iteration methods like `#each`.
1111
#
1212
# @note `a += b` is **not** a **thread-safe** operation on
13-
# `Concurrent::Array`. It reads array `a`, then it creates new `Concurrent::Array`
14-
# which is concatenation of `a` and `b`, then it writes the concatenation to `a`.
15-
# The read and write are independent operations they do not form a single atomic
16-
# operation therefore when two `+=` operations are executed concurrently updates
17-
# may be lost. Use `#concat` instead.
13+
# `Concurrent::Array`. It reads array `a`, then it creates new `Concurrent::Array`
14+
# which is concatenation of `a` and `b`, then it writes the concatenation to `a`.
15+
# The read and write are independent operations they do not form a single atomic
16+
# operation therefore when two `+=` operations are executed concurrently updates
17+
# may be lost. Use `#concat` instead.
1818
#
1919
# @see http://ruby-doc.org/core-2.2.0/Array.html Ruby standard library `Array`
2020

lib/concurrent/concern/dereferenceable.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ def value=(value)
3737
# returning data to the caller (dereferencing).
3838
#
3939
# @note Most classes that include this module will call `#set_deref_options`
40-
# from within the constructor, thus allowing these options to be set at
41-
# object creation.
40+
# from within the constructor, thus allowing these options to be set at
41+
# object creation.
4242
#
4343
# @param [Hash] opts the options defining dereference behavior.
4444
# @option opts [String] :dup_on_deref (false) call `#dup` before returning the data

lib/concurrent/set.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ module Concurrent
1111
# or writing at a time. This includes iteration methods like `#each`.
1212
#
1313
# @note `a += b` is **not** a **thread-safe** operation on
14-
# `Concurrent::Set`. It reads Set `a`, then it creates new `Concurrent::Set`
15-
# which is union of `a` and `b`, then it writes the union to `a`.
16-
# The read and write are independent operations they do not form a single atomic
17-
# operation therefore when two `+=` operations are executed concurrently updates
18-
# may be lost. Use `#merge` instead.
14+
# `Concurrent::Set`. It reads Set `a`, then it creates new `Concurrent::Set`
15+
# which is union of `a` and `b`, then it writes the union to `a`.
16+
# The read and write are independent operations they do not form a single atomic
17+
# operation therefore when two `+=` operations are executed concurrently updates
18+
# may be lost. Use `#merge` instead.
1919
#
2020
# @see http://ruby-doc.org/stdlib-2.4.0/libdoc/set/rdoc/Set.html Ruby standard library `Set`
2121

0 commit comments

Comments
 (0)