sub atomic-fetch-inc

Documentation for sub atomic-fetch-inc, assembled from the following types:

class atomicint

From atomicint

(atomicint) sub atomic-fetch-inc

Defined as:

multi sub atomic-fetch-inc(atomicint $ is rw)

Performs an atomic increment on a native integer. This will be performed using hardware-provided atomic operations. Since the operation is atomic, it is safe to use without acquiring a lock. Returns the value as seen before incrementing it. Overflow will wrap around silently.