Skip to content

Commit e3630fc

Browse files
authored
Merge pull request #688 from olleolleolle/fix/misspellings
Fix misspellings
2 parents fd56ba3 + f75d5b2 commit e3630fc

File tree

13 files changed

+20
-20
lines changed

13 files changed

+20
-20
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ There are a few very strong guidelines which we follow when adding features. Sub
5656

5757
* **No downstream dependencies:** Concurrent Ruby is a foundational library used by major projects like [Rails](http://rubyonrails.org/). Our downstream dependencies become everyone's dependencies. Because we cannot guarantee that downstream projects meet our development standards, it's best for everyone if we simply aviod dependencies.
5858
* **Do not monkey patch Ruby:** Changing Ruby for our convenience affects every gem in every project that uses Concurrent Ruby. Monkey patching Ruby may change the behavior of other libraries in unexpected ways and destabilize projects which depend on us.
59-
* **Do not polute the global namespace:** Putting all our code within the `Concurrent` module guarantees that there will be no namespace collisions with other gems or the projects which depend on us.
59+
* **Do not pollute the global namespace:** Putting all our code within the `Concurrent` module guarantees that there will be no namespace collisions with other gems or the projects which depend on us.
6060
* **No global varaibles:** Global state should be kept to an absolute minimum. When it's necessary, add it to the global gem configuration.
6161
* **Minimize per-object configuration:** Ruby makes programmers happy. One of Ruby's charms is its simplicity. Concurrent Ruby aims to mirror this simplicity. Advanced configuration options are encouraged when they provide value, but every abstraction should have reasonable defaults that meet the needs of most users.
6262
* **Provide explicit behavior and guarantees:** Our APIs should be concrete and clearly define what they do (and don't do). Users of Concurrent Ruby should never be surprised by unexpected behavior or be given guarantees we cannot keep.

doc/actor/messaging.in.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ def on_message(message)
2525

2626
calculator = Calculator.spawn('calculator')
2727
addition = calculator.ask Add[1, 2]
28-
substraction = calculator.ask Subtract[1, 0.5]
29-
results = (addition & substraction)
28+
subtraction = calculator.ask Subtract[1, 0.5]
29+
results = (addition & subtraction)
3030
results.value!
3131

3232
calculator.ask! :terminate!

doc/actor/messaging.out.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ def on_message(message)
2727
# => #<Concurrent::Actor::Reference:0x7fbedba52d90 /calculator (Calculator)>
2828
addition = calculator.ask Add[1, 2]
2929
# => <#Concurrent::Promises::Future:0x7fbedc05f7b0 pending>
30-
substraction = calculator.ask Subtract[1, 0.5]
30+
subtraction = calculator.ask Subtract[1, 0.5]
3131
# => <#Concurrent::Promises::Future:0x7fbedd891388 pending>
32-
results = (addition & substraction)
32+
results = (addition & subtraction)
3333
# => <#Concurrent::Promises::Future:0x7fbedc04eeb0 pending>
3434
results.value! # => [3, 0.5]
3535

examples/graph_atomic_bench.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@
2323

2424

2525
if conf[:vary] == "threads"
26-
# Vary the number of concurrent threads that update the value.
26+
# Varies the number of concurrent threads that update the value.
2727
#
2828
# There is a total count of 1mio updates that is distributed
2929
# between the number of threads.
3030
#
31-
# A pair number of threads is used so that even add and odd substract 1.
32-
# This avoid creating instances for Bignum since the number should
31+
# A doubled number of threads is used so that even adds 1 and odd subtracts 1.
32+
# This avoids creating instances for Bignum since the number should
3333
# stay in the Fixnum range.
3434
#
3535
(1..100).each do |i|

lib/concurrent/async.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ module Concurrent
159159
#
160160
# To get the state *at the current* time, irrespective of an enqueued method
161161
# calls, a reader method must be called directly. This is inherently unsafe
162-
# unless the instance variable is itself thread-safe, preferrably using one
162+
# unless the instance variable is itself thread-safe, preferably using one
163163
# of the thread-safe classes within this library. Because the thread-safe
164164
# classes within this library are internally-locking or non-locking, they can
165165
# be safely used from within asynchronous methods without causing deadlocks.
@@ -188,7 +188,7 @@ module Concurrent
188188
#
189189
# Class variables should be avoided. Class variables represent shared state.
190190
# Shared state is anathema to concurrency. Should there be a need to share
191-
# state using class variables they *must* be thread-safe, preferrably
191+
# state using class variables they *must* be thread-safe, preferably
192192
# using the thread-safe classes within this library. When updating class
193193
# variables, never assign a new value/object to the variable itself. Assignment
194194
# is not thread-safe in Ruby. Instead, use the thread-safe update functions

lib/concurrent/atomic/event.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module Concurrent
3232
# # prints:
3333
# # t2 calling set
3434
# # t1 is waiting
35-
# # event ocurred
35+
# # event occurred
3636
class Event < Synchronization::LockableObject
3737

3838
# Creates a new `Event` in the unset state. Threads calling `#wait` on the

lib/concurrent/collection/map/atomic_reference_map_backend.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ def try_await_lock(table, i)
289289
end
290290
end
291291
elsif cas_hash(my_hash, my_hash | WAITING)
292-
force_aquire_lock(table, i)
292+
force_acquire_lock(table, i)
293293
break
294294
end
295295
end
@@ -330,7 +330,7 @@ def unlock_via_hash(locked_hash, node_hash)
330330
end
331331

332332
private
333-
def force_aquire_lock(table, i)
333+
def force_acquire_lock(table, i)
334334
cheap_synchronize do
335335
if equal?(table.volatile_get(i)) && (hash & WAITING) == WAITING
336336
cheap_wait

lib/concurrent/collection/map/non_concurrent_map_backend.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class NonConcurrentMapBackend
1010

1111
# WARNING: all public methods of the class must operate on the @backend
1212
# directly without calling each other. This is important because of the
13-
# SynchronizedMapBackend which uses a non-reentrant mutex for perfomance
13+
# SynchronizedMapBackend which uses a non-reentrant mutex for performance
1414
# reasons.
1515
def initialize(options = nil)
1616
@backend = {}

lib/concurrent/exchanger.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def do_exchange(value, timeout)
218218
# node's initial value. It never changes. It's what the fulfiller returns on
219219
# success. The occupier's hole is where the fulfiller put its item. It's the
220220
# item that the occupier returns on success. The latch is used for synchronization.
221-
# Becuase a thread may act as either an occupier or fulfiller (or possibly
221+
# Because a thread may act as either an occupier or fulfiller (or possibly
222222
# both in periods of high contention) every thread creates a node when
223223
# the exchange method is first called.
224224
#

lib/concurrent/mutable_struct.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def to_h
108108
#
109109
# Attribute Reference
110110
#
111-
# @param [Symbol, String, Integer] member the string or symbol name of the memeber
111+
# @param [Symbol, String, Integer] member the string or symbol name of the member
112112
# for which to obtain the value or the member's index
113113
#
114114
# @return [Object] the value of the given struct member or the member at the given index.
@@ -175,7 +175,7 @@ def select(&block)
175175
#
176176
# Sets the value of the given struct member or the member at the given index.
177177
#
178-
# @param [Symbol, String, Integer] member the string or symbol name of the memeber
178+
# @param [Symbol, String, Integer] member the string or symbol name of the member
179179
# for which to obtain the value or the member's index
180180
#
181181
# @return [Object] the value of the given struct member or the member at the given index.

0 commit comments

Comments
 (0)