Returns a Sink
that accesses the same memory location as this view.
Returns a Sink
that accesses the same memory location as this view.
The returned Sink
might be the original reference that was used to
construct this view, or it might be a Sink
that is equivalent (and
==
) to the original.
a Sink
that accesses the same memory location as this view.
Performs an atomic write; equivalent to update(v)
.
Performs an atomic write and returns true, or returns false.
Performs an atomic write and returns true, or returns false. The STM implementation may choose to return false to reduce (not necessarily avoid) blocking. If no other threads are performing any transactional or atomic accesses then this method will succeed.
Performs an atomic write of the value in ref
.
Performs an atomic write of the value in ref
. If an atomic block
is active (see Txn.findCurrent
) then the write will be performed
as part of the transaction, otherwise it will act as if it was
performed inside a new atomic block. Equivalent to set(v)
.
Sink.View[+A]
consists of the contra-variant write-only operations ofRef.View[A]
.