File tree Expand file tree Collapse file tree 6 files changed +12
-6
lines changed Expand file tree Collapse file tree 6 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,8 @@ module Edge
6
6
# An atomic reference which maintains an object reference along with a mark bit
7
7
# that can be updated atomically.
8
8
#
9
- # @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicMarkableReference.html java.util.concurrent.atomic.AtomicMarkableReference
10
- #
11
- # @api Edge
9
+ # @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicMarkableReference.html
10
+ # java.util.concurrent.atomic.AtomicMarkableReference
12
11
class AtomicMarkableReference < ::Concurrent ::Synchronization ::Object
13
12
14
13
private ( *attr_atomic ( :reference ) )
Original file line number Diff line number Diff line change 1
1
module Concurrent
2
2
3
3
# Provides tools for cooperative cancellation.
4
- # Inspired by https://msdn.microsoft.com/en-us/library/dd537607(v=vs.110).aspx
4
+ # Inspired by <https://msdn.microsoft.com/en-us/library/dd537607(v=vs.110).aspx>
5
+ #
5
6
# @example
6
7
# # Create new cancellation. `cancellation` is used for cancelling, `token` is passed down to
7
8
# # tasks for cooperative cancellation
8
9
# cancellation, token = Concurrent::Cancellation.create
9
10
# Thread.new(token) do |token|
10
- # # Count 1+1 (simulating some other meaningful work) repeatedly until the token is cancelled through
11
- # # cancellation.
11
+ # # Count 1+1 (simulating some other meaningful work) repeatedly
12
+ # # until the token is cancelled through cancellation.
12
13
# token.loop_until_canceled { 1+1 }
13
14
# end
14
15
# sleep 0.1
Original file line number Diff line number Diff line change 1
1
module Concurrent
2
2
3
+ # @!visibility private
3
4
class LockFreeQueue < Synchronization ::Object
4
5
5
6
class Node < Synchronization ::Object
Original file line number Diff line number Diff line change 1
1
module Concurrent
2
2
module Synchronization
3
+ # TODO (pitr-ch 04-Dec-2016): should be in edge
3
4
class Condition < LockableObject
4
5
safe_initialization!
5
6
6
7
# TODO (pitr 12-Sep-2015): locks two objects, improve
8
+ # TODO (pitr 26-Sep-2015): study
9
+ # http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/8-b132/java/util/concurrent/locks/AbstractQueuedSynchronizer.java#AbstractQueuedSynchronizer.Node
7
10
8
11
singleton_class . send :alias_method , :private_new , :new
9
12
private_class_method :new
Original file line number Diff line number Diff line change 1
1
module Concurrent
2
2
module Synchronization
3
+ # TODO (pitr-ch 04-Dec-2016): should be in edge
3
4
class Lock < LockableObject
4
5
# TODO use JavaReentrantLock on JRuby
5
6
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ module Synchronization
22
22
# - volatile instance variables see {Object.attr_volatile}
23
23
# - volatile instance variables see {Object.attr_atomic}
24
24
class Object < ObjectImplementation
25
+ # TODO make it a module if possible
25
26
26
27
# @!method self.attr_volatile(*names)
27
28
# Creates methods for reading and writing (as `attr_accessor` does) to a instance variable with
You can’t perform that action at this time.
0 commit comments