Skip to content

Commit e16d33f

Browse files
committed
Marked private API abstractions.
1 parent 37a3c30 commit e16d33f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+86
-10
lines changed

lib/concurrent/agent.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,15 @@ class Agent
9191
#
9292
# @param [Object] initial the initial value
9393
#
94-
# @!macro executor_and_deref_options
94+
# @!macro [attach] executor_and_deref_options
95+
#
96+
# @param [Hash] opts the options used to define the behavior at update and deref
97+
# and to specify the executor on which to perform actions
98+
# @option opts [Executor] :executor when set use the given `Executor` instance.
99+
# Three special values are also supported: `:task` returns the global task pool,
100+
# `:operation` returns the global operation pool, and `:immediate` returns a new
101+
# `ImmediateExecutor` object.
102+
# @!macro deref_options
95103
def initialize(initial, opts = {})
96104
@value = initial
97105
@rescuers = []

lib/concurrent/atomic/atomic_boolean.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ module Concurrent
2222
# 3.340000 0.010000 3.350000 ( 0.855000)
2323
#
2424
# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicBoolean.html java.util.concurrent.atomic.AtomicBoolean
25+
#
26+
# @api private
2527
class MutexAtomicBoolean < Synchronization::Object
2628

2729
# @!macro [attach] atomic_boolean_method_initialize
@@ -105,6 +107,7 @@ def ns_make_value(value)
105107
end
106108
end
107109

110+
# @api private
108111
AtomicBooleanImplementation = case
109112
when Concurrent.on_jruby?
110113
JavaAtomicBoolean

lib/concurrent/atomic/atomic_fixnum.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ module Concurrent
2222
# 4.520000 0.030000 4.550000 ( 1.187000)
2323
#
2424
# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicLong.html java.util.concurrent.atomic.AtomicLong
25+
#
26+
# @api private
2527
class MutexAtomicFixnum < Synchronization::Object
2628

2729
# http://stackoverflow.com/questions/535721/ruby-max-integer
@@ -132,6 +134,7 @@ def range_check!(value)
132134
end
133135
end
134136

137+
# @api private
135138
AtomicFixnumImplementation = case
136139
when Concurrent.on_jruby?
137140
JavaAtomicFixnum

lib/concurrent/atomic/count_down_latch.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ module Concurrent
1111
# method. Each of the other threads calls `#count_down` when done with its work.
1212
# When the latch counter reaches zero the waiting thread is unblocked and continues
1313
# with its work. A `CountDownLatch` can be used only once. Its value cannot be reset.
14+
#
15+
# @api private
1416
class PureCountDownLatch < Synchronization::Object
1517

1618
# @!macro [attach] count_down_latch_method_initialize
@@ -69,6 +71,7 @@ def ns_initialize(count)
6971
if Concurrent.on_jruby?
7072

7173
# @!macro count_down_latch
74+
# @api private
7275
class JavaCountDownLatch
7376

7477
# @!macro count_down_latch_method_initialize

lib/concurrent/atomic/cyclic_barrier.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ module Concurrent
44

55
class CyclicBarrier < Synchronization::Object
66

7+
# @api private
78
Generation = Struct.new(:status)
89
private_constant :Generation
910

lib/concurrent/atomic/thread_local_var.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ module Concurrent
3434
# @see https://docs.oracle.com/javase/7/docs/api/java/lang/ThreadLocal.html Java ThreadLocal
3535
class AbstractThreadLocalVar
3636

37+
# @api private
3738
NIL_SENTINEL = Object.new
3839
private_constant :NIL_SENTINEL
3940

lib/concurrent/atomic/thread_local_var/weak_key_map.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
module Concurrent
2323

24+
# @api private
2425
class AbstractThreadLocalVar
2526

2627
begin

lib/concurrent/atomic_reference/direct_update.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
module Concurrent
44

55
# Define update methods that use direct paths
6+
# @api private
67
module AtomicDirectUpdate
78

89
# @!macro [attach] atomic_reference_method_update

lib/concurrent/atomic_reference/jruby.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
module Concurrent
77

88
# @!macro atomic_reference
9+
# @api private
910
class JavaAtomicReference
1011
include Concurrent::AtomicDirectUpdate
1112
end

lib/concurrent/atomic_reference/mutex_atomic.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
module Concurrent
66

77
# @!macro atomic_reference
8+
# @api private
89
class MutexAtomicReference
910
include Concurrent::AtomicDirectUpdate
1011
include Concurrent::AtomicNumericCompareAndSetWrapper

0 commit comments

Comments
 (0)