Package rx.internal.util.unsafe
package rx.internal.util.unsafe
-
ClassDescriptionA base data structure for concurrent linked queues.A concurrent access enabling class used by circular array based queues this class exposes an offset computation method along with differently memory fenced load/store methods into the underlying array.This is a tagging interface for the queues in this library which implement a subset of the
Queue
interface sufficient for concurrent message passing.
Message passing queues offer happens before semantics to messages passed through, namely that writes made by the producer before offering the message are visible to the consuming thread after the message has been polled out of the queue.A Multi-Producer-Multi-Consumer queue based on aConcurrentCircularArrayQueue
.This is a direct Java port of the MPSC algorithm as presented on 1024 Cores by D.This interface is provided for monitoring purposes only and is only available on queues where it is easy to provide it.A Single-Producer-Single-Consumer queue backed by a pre-allocated buffer.This is a weakened version of the MPSC algorithm as presented on 1024 Cores by D.All use of this class MUST first check that UnsafeAccess.isUnsafeAvailable() == true otherwise NPEs will happen in environments without "suc.misc.Unsafe" such as Android.