Package-level declarations
Utility functions for concurrent programming.
Utility functions for concurrent programming.
Utility functions for concurrent programming.
Types
An Array
An Int value that is always updated atomically. For additional details about atomicity guarantees for reads and writes see kotlin.concurrent.Volatile.
An IntArray in which elements are always updated atomically. For additional details about atomicity guarantees for reads and writes see kotlin.concurrent.Volatile.
A Long value that is always updated atomically. For additional details about atomicity guarantees for reads and writes see kotlin.concurrent.Volatile.
An LongArray in which elements are always updated atomically. For additional details about atomicity guarantees for reads and writes see kotlin.concurrent.Volatile.
A kotlinx.cinterop.NativePtr value that is always updated atomically. For additional details about atomicity guarantees for reads and writes see kotlin.concurrent.Volatile.
An object reference that is always updated atomically.
Marks the backing field of the annotated var
property as volatile
, meaning that reads and writes to this field are atomic and writes are always made visible to other threads. If another thread reads the value of this field (e.g. through its accessor), it sees not only that value, but all side effects that led to writing that value.
Marks the JVM backing field of the annotated var
property as volatile
, meaning that reads and writes to this field are atomic and writes are always made visible to other threads. If another thread reads the value of this field (e.g. through its accessor), it sees not only that value, but all side effects that led to writing that value.
Marks the backing field of the annotated var
property as volatile
, meaning that reads and writes to this field are atomic and writes are always made visible to other threads. If another thread reads the value of this field (e.g. through its accessor), it sees not only that value, but all side effects that led to writing that value.
Functions
Creates a new AtomicArray
Creates a new AtomicIntArray of the given size, where each element is initialized by calling the given init function.
Creates a new AtomicLongArray of the given size, where each element is initialized by calling the given init function.
Creates a timer that executes the specified action periodically, starting at the specified startAt date and with the interval of period milliseconds between the start of the previous task and the start of the next one.
Creates a timer that executes the specified action periodically, starting after the specified initialDelay (expressed in milliseconds) and with the interval of period milliseconds between the start of the previous task and the start of the next one.
Schedules an action to be executed periodically, starting at the specified time and with the interval of period milliseconds between the end of the previous task and the start of the next one.
Schedules an action to be executed periodically, starting after the specified delay (expressed in milliseconds) and with the interval of period milliseconds between the end of the previous task and the start of the next one.
Schedules an action to be executed periodically, starting at the specified time and with the interval of period milliseconds between the start of the previous task and the start of the next one.
Schedules an action to be executed periodically, starting after the specified delay (expressed in milliseconds) and with the interval of period milliseconds between the start of the previous task and the start of the next one.
Creates a timer that executes the specified action periodically, starting at the specified startAt date and with the interval of period milliseconds between the end of the previous task and the start of the next one.
Creates a timer that executes the specified action periodically, starting after the specified initialDelay (expressed in milliseconds) and with the interval of period milliseconds between the end of the previous task and the start of the next one.