Documentation for sub atomic-fetch-dec assembled from the following pages:

Class: atomicint §

From atomicint

(atomicint) sub atomic-fetch-dec §

Defined as:

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

Performs an atomic decrement 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 decrementing it. Overflow will wrap around silently.