Liking cljdoc? Tell your friends :D

co.multiply.conc.integer

A cross-platform atomic integer.

On the JVM, backed by AtomicInteger. Thread-safe for concurrent operations. On ClojureScript, backed by a mutable integer (single-threaded).

A cross-platform atomic integer.

On the JVM, backed by AtomicInteger. Thread-safe for concurrent operations.
On ClojureScript, backed by a mutable integer (single-threaded).
raw docstring

compareAndSetclj/smacro

(compareAndSet i expected assigned)

Set the integer to assigned if its current value is expected.

Returns true if the update succeeded, false otherwise.

Set the integer to assigned if its current value is expected.

Returns true if the update succeeded, false otherwise.
raw docstring

decrementAndGetclj/smacro

(decrementAndGet i)

Decrement the integer and return the new value.

Decrement the integer and return the new value.
raw docstring

getAndDecrementclj/smacro

(getAndDecrement i)

Return the current value, then decrement.

Return the current value, then decrement.
raw docstring

getAndIncrementclj/smacro

(getAndIncrement i)

Return the current value, then increment.

Return the current value, then increment.
raw docstring

getAndUpdateclj/smacro

(getAndUpdate i f)

Return the current value, then update by applying f to it.

Return the current value, then update by applying f to it.
raw docstring

getValueclj/smacro

(getValue i)

Get the current value of the integer.

Get the current value of the integer.
raw docstring

incrementAndGetclj/smacro

(incrementAndGet i)

Increment the integer and return the new value.

Increment the integer and return the new value.
raw docstring

integerclj/smacro

(integer n)

Create a new atomic integer with initial value n.

Create a new atomic integer with initial value n.
raw docstring

updateAndGetclj/smacro

(updateAndGet i f)

Update the integer by applying f to it, then return the new value.

Update the integer by applying f to it, then return the new value.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close