Constructs an Atomic[T]
reference.
Constructs an Atomic[T]
reference. Based on the initialValue
, it will return the best, most specific
type. E.g. you give it a number, it will return something inheriting from AtomicNumber[T]
. That's why
it takes an AtomicBuilder[T, R]
as an implicit parameter - but worry not about such details as it just works.
is the initial value with which to initialize the Atomic reference
is the builder that helps us to build the best reference possible, based on our initialValue
Returns the builder that would be chosen to construct Atomic references
for the given initialValue
.