Atomics

@native @JSType trait Atomics extends StObject
trait StObject
class Object
trait Any
class Object
trait Matchable
class Any

Value members

Concrete methods

def add(typedArray: BigInt64Array, index: Double, value: BigInt): BigInt

Adds a value to the value at the given position in the array, returning the original value. Until this atomic operation completes, any other read or write operation against the array will block.

Adds a value to the value at the given position in the array, returning the original value. Until this atomic operation completes, any other read or write operation against the array will block.

def add(typedArray: BigUint64Array, index: Double, value: BigInt): BigInt
def add(typedArray: Int16Array, index: Double, value: Double): Double
def add(typedArray: Int32Array, index: Double, value: Double): Double
def add(typedArray: Int8Array, index: Double, value: Double): Double

Adds a value to the value at the given position in the array, returning the original value. Until this atomic operation completes, any other read or write operation against the array will block.

Adds a value to the value at the given position in the array, returning the original value. Until this atomic operation completes, any other read or write operation against the array will block.

def add(typedArray: Uint16Array, index: Double, value: Double): Double
def add(typedArray: Uint32Array, index: Double, value: Double): Double
def add(typedArray: Uint8Array, index: Double, value: Double): Double
def and(typedArray: BigInt64Array, index: Double, value: BigInt): BigInt

Stores the bitwise AND of a value with the value at the given position in the array, returning the original value. Until this atomic operation completes, any other read or write operation against the array will block.

Stores the bitwise AND of a value with the value at the given position in the array, returning the original value. Until this atomic operation completes, any other read or write operation against the array will block.

def and(typedArray: BigUint64Array, index: Double, value: BigInt): BigInt
def and(typedArray: Int16Array, index: Double, value: Double): Double
def and(typedArray: Int32Array, index: Double, value: Double): Double
def and(typedArray: Int8Array, index: Double, value: Double): Double

Stores the bitwise AND of a value with the value at the given position in the array, returning the original value. Until this atomic operation completes, any other read or write operation against the array will block.

Stores the bitwise AND of a value with the value at the given position in the array, returning the original value. Until this atomic operation completes, any other read or write operation against the array will block.

def and(typedArray: Uint16Array, index: Double, value: Double): Double
def and(typedArray: Uint32Array, index: Double, value: Double): Double
def and(typedArray: Uint8Array, index: Double, value: Double): Double
def compareExchange(typedArray: BigInt64Array, index: Double, expectedValue: BigInt, replacementValue: BigInt): BigInt

Replaces the value at the given position in the array if the original value equals the given expected value, returning the original value. Until this atomic operation completes, any other read or write operation against the array will block.

Replaces the value at the given position in the array if the original value equals the given expected value, returning the original value. Until this atomic operation completes, any other read or write operation against the array will block.

def compareExchange(typedArray: BigUint64Array, index: Double, expectedValue: BigInt, replacementValue: BigInt): BigInt
def compareExchange(typedArray: Int16Array, index: Double, expectedValue: Double, replacementValue: Double): Double
def compareExchange(typedArray: Int32Array, index: Double, expectedValue: Double, replacementValue: Double): Double
def compareExchange(typedArray: Int8Array, index: Double, expectedValue: Double, replacementValue: Double): Double

Replaces the value at the given position in the array if the original value equals the given expected value, returning the original value. Until this atomic operation completes, any other read or write operation against the array will block.

Replaces the value at the given position in the array if the original value equals the given expected value, returning the original value. Until this atomic operation completes, any other read or write operation against the array will block.

def compareExchange(typedArray: Uint16Array, index: Double, expectedValue: Double, replacementValue: Double): Double
def compareExchange(typedArray: Uint32Array, index: Double, expectedValue: Double, replacementValue: Double): Double
def compareExchange(typedArray: Uint8Array, index: Double, expectedValue: Double, replacementValue: Double): Double
def exchange(typedArray: BigInt64Array, index: Double, value: BigInt): BigInt

Replaces the value at the given position in the array, returning the original value. Until this atomic operation completes, any other read or write operation against the array will block.

Replaces the value at the given position in the array, returning the original value. Until this atomic operation completes, any other read or write operation against the array will block.

def exchange(typedArray: BigUint64Array, index: Double, value: BigInt): BigInt
def exchange(typedArray: Int16Array, index: Double, value: Double): Double
def exchange(typedArray: Int32Array, index: Double, value: Double): Double
def exchange(typedArray: Int8Array, index: Double, value: Double): Double

Replaces the value at the given position in the array, returning the original value. Until this atomic operation completes, any other read or write operation against the array will block.

Replaces the value at the given position in the array, returning the original value. Until this atomic operation completes, any other read or write operation against the array will block.

def exchange(typedArray: Uint16Array, index: Double, value: Double): Double
def exchange(typedArray: Uint32Array, index: Double, value: Double): Double
def exchange(typedArray: Uint8Array, index: Double, value: Double): Double
def isLockFree(size: Double): Boolean

Returns a value indicating whether high-performance algorithms can use atomic operations (true) or must use locks (false) for the given number of bytes-per-element of a typed array.

Returns a value indicating whether high-performance algorithms can use atomic operations (true) or must use locks (false) for the given number of bytes-per-element of a typed array.

def load(typedArray: BigInt64Array, index: Double): BigInt

Returns the value at the given position in the array. Until this atomic operation completes, any other read or write operation against the array will block.

Returns the value at the given position in the array. Until this atomic operation completes, any other read or write operation against the array will block.

def load(typedArray: BigUint64Array, index: Double): BigInt
def load(typedArray: Int16Array, index: Double): Double
def load(typedArray: Int32Array, index: Double): Double
def load(typedArray: Int8Array, index: Double): Double

Returns the value at the given position in the array. Until this atomic operation completes, any other read or write operation against the array will block.

Returns the value at the given position in the array. Until this atomic operation completes, any other read or write operation against the array will block.

def load(typedArray: Uint16Array, index: Double): Double
def load(typedArray: Uint32Array, index: Double): Double
def load(typedArray: Uint8Array, index: Double): Double
def notify(typedArray: BigInt64Array, index: Double): Double

Wakes up sleeping agents that are waiting on the given index of the array, returning the number of agents that were awoken.

Wakes up sleeping agents that are waiting on the given index of the array, returning the number of agents that were awoken.

Value Params
count

The number of sleeping agents to notify. Defaults to +Infinity.

index

The position in the typedArray to wake up on.

typedArray

A shared BigInt64Array.

def notify(typedArray: BigInt64Array, index: Double, count: Double): Double
def notify(typedArray: Int32Array, index: Double): Double

Wakes up sleeping agents that are waiting on the given index of the array, returning the number of agents that were awoken.

Wakes up sleeping agents that are waiting on the given index of the array, returning the number of agents that were awoken.

Value Params
count

The number of sleeping agents to notify. Defaults to +Infinity.

index

The position in the typedArray to wake up on.

typedArray

A shared Int32Array.

def notify(typedArray: Int32Array, index: Double, count: Double): Double
def or(typedArray: BigInt64Array, index: Double, value: BigInt): BigInt

Stores the bitwise OR of a value with the value at the given position in the array, returning the original value. Until this atomic operation completes, any other read or write operation against the array will block.

Stores the bitwise OR of a value with the value at the given position in the array, returning the original value. Until this atomic operation completes, any other read or write operation against the array will block.

def or(typedArray: BigUint64Array, index: Double, value: BigInt): BigInt
def or(typedArray: Int16Array, index: Double, value: Double): Double
def or(typedArray: Int32Array, index: Double, value: Double): Double
def or(typedArray: Int8Array, index: Double, value: Double): Double

Stores the bitwise OR of a value with the value at the given position in the array, returning the original value. Until this atomic operation completes, any other read or write operation against the array will block.

Stores the bitwise OR of a value with the value at the given position in the array, returning the original value. Until this atomic operation completes, any other read or write operation against the array will block.

def or(typedArray: Uint16Array, index: Double, value: Double): Double
def or(typedArray: Uint32Array, index: Double, value: Double): Double
def or(typedArray: Uint8Array, index: Double, value: Double): Double
def store(typedArray: BigInt64Array, index: Double, value: BigInt): BigInt

Stores a value at the given position in the array, returning the new value. Until this atomic operation completes, any other read or write operation against the array will block.

Stores a value at the given position in the array, returning the new value. Until this atomic operation completes, any other read or write operation against the array will block.

def store(typedArray: BigUint64Array, index: Double, value: BigInt): BigInt
def store(typedArray: Int16Array, index: Double, value: Double): Double
def store(typedArray: Int32Array, index: Double, value: Double): Double
def store(typedArray: Int8Array, index: Double, value: Double): Double

Stores a value at the given position in the array, returning the new value. Until this atomic operation completes, any other read or write operation against the array will block.

Stores a value at the given position in the array, returning the new value. Until this atomic operation completes, any other read or write operation against the array will block.

def store(typedArray: Uint16Array, index: Double, value: Double): Double
def store(typedArray: Uint32Array, index: Double, value: Double): Double
def store(typedArray: Uint8Array, index: Double, value: Double): Double
def sub(typedArray: BigInt64Array, index: Double, value: BigInt): BigInt

Subtracts a value from the value at the given position in the array, returning the original value. Until this atomic operation completes, any other read or write operation against the array will block.

Subtracts a value from the value at the given position in the array, returning the original value. Until this atomic operation completes, any other read or write operation against the array will block.

def sub(typedArray: BigUint64Array, index: Double, value: BigInt): BigInt
def sub(typedArray: Int16Array, index: Double, value: Double): Double
def sub(typedArray: Int32Array, index: Double, value: Double): Double
def sub(typedArray: Int8Array, index: Double, value: Double): Double

Subtracts a value from the value at the given position in the array, returning the original value. Until this atomic operation completes, any other read or write operation against the array will block.

Subtracts a value from the value at the given position in the array, returning the original value. Until this atomic operation completes, any other read or write operation against the array will block.

def sub(typedArray: Uint16Array, index: Double, value: Double): Double
def sub(typedArray: Uint32Array, index: Double, value: Double): Double
def sub(typedArray: Uint8Array, index: Double, value: Double): Double
def wait(typedArray: BigInt64Array, index: Double, value: BigInt): ok | not-equal | timed-out

If the value at the given position in the array is equal to the provided value, the current agent is put to sleep causing execution to suspend until the timeout expires (returning "timed-out") or until the agent is awoken (returning "ok"); otherwise, returns "not-equal".

If the value at the given position in the array is equal to the provided value, the current agent is put to sleep causing execution to suspend until the timeout expires (returning "timed-out") or until the agent is awoken (returning "ok"); otherwise, returns "not-equal".

def wait(typedArray: BigInt64Array, index: Double, value: BigInt, timeout: Double): ok | not-equal | timed-out
def wait(typedArray: Int32Array, index: Double, value: Double): ok | not-equal | timed-out

If the value at the given position in the array is equal to the provided value, the current agent is put to sleep causing execution to suspend until the timeout expires (returning "timed-out") or until the agent is awoken (returning "ok"); otherwise, returns "not-equal".

If the value at the given position in the array is equal to the provided value, the current agent is put to sleep causing execution to suspend until the timeout expires (returning "timed-out") or until the agent is awoken (returning "ok"); otherwise, returns "not-equal".

def wait(typedArray: Int32Array, index: Double, value: Double, timeout: Double): ok | not-equal | timed-out
def xor(typedArray: BigInt64Array, index: Double, value: BigInt): BigInt

Stores the bitwise XOR of a value with the value at the given position in the array, returning the original value. Until this atomic operation completes, any other read or write operation against the array will block.

Stores the bitwise XOR of a value with the value at the given position in the array, returning the original value. Until this atomic operation completes, any other read or write operation against the array will block.

def xor(typedArray: BigUint64Array, index: Double, value: BigInt): BigInt
def xor(typedArray: Int16Array, index: Double, value: Double): Double
def xor(typedArray: Int32Array, index: Double, value: Double): Double
def xor(typedArray: Int8Array, index: Double, value: Double): Double

Stores the bitwise XOR of a value with the value at the given position in the array, returning the original value. Until this atomic operation completes, any other read or write operation against the array will block.

Stores the bitwise XOR of a value with the value at the given position in the array, returning the original value. Until this atomic operation completes, any other read or write operation against the array will block.

def xor(typedArray: Uint16Array, index: Double, value: Double): Double
def xor(typedArray: Uint32Array, index: Double, value: Double): Double
def xor(typedArray: Uint8Array, index: Double, value: Double): Double

Inherited methods

def hasOwnProperty(v: String): Boolean
Inherited from
Object
def isPrototypeOf(v: Object): Boolean
Inherited from
Object
def propertyIsEnumerable(v: String): Boolean
Inherited from
Object
def toLocaleString(): String
Inherited from
Object
def valueOf(): Any
Inherited from
Object

Concrete fields

@JSName