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
66 # An atomic reference which maintains an object reference along with a mark bit
77 # that can be updated atomically.
88 #
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
1211 class AtomicMarkableReference < ::Concurrent ::Synchronization ::Object
1312
1413 private ( *attr_atomic ( :reference ) )
Original file line number Diff line number Diff line change 11module Concurrent
22
33 # 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+ #
56 # @example
67 # # Create new cancellation. `cancellation` is used for cancelling, `token` is passed down to
78 # # tasks for cooperative cancellation
89 # cancellation, token = Concurrent::Cancellation.create
910 # 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.
1213 # token.loop_until_canceled { 1+1 }
1314 # end
1415 # sleep 0.1
Original file line number Diff line number Diff line change 11module Concurrent
22
3+ # @!visibility private
34 class LockFreeQueue < Synchronization ::Object
45
56 class Node < Synchronization ::Object
Original file line number Diff line number Diff line change 11module Concurrent
22 module Synchronization
3+ # TODO (pitr-ch 04-Dec-2016): should be in edge
34 class Condition < LockableObject
45 safe_initialization!
56
67 # 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
710
811 singleton_class . send :alias_method , :private_new , :new
912 private_class_method :new
Original file line number Diff line number Diff line change 11module Concurrent
22 module Synchronization
3+ # TODO (pitr-ch 04-Dec-2016): should be in edge
34 class Lock < LockableObject
45 # TODO use JavaReentrantLock on JRuby
56
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ module Synchronization
2222 # - volatile instance variables see {Object.attr_volatile}
2323 # - volatile instance variables see {Object.attr_atomic}
2424 class Object < ObjectImplementation
25+ # TODO make it a module if possible
2526
2627 # @!method self.attr_volatile(*names)
2728 # 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