Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » Thing » AtomicInt » new AtomicInt from ZZ
next | previous | forward | backward | up | index | toc

# new AtomicInt from ZZ -- initialize an atomic integer

- Usage:
    `new AtomicInt from x`
    `new AtomicInt`
- Inputs:
  - x, an integer,
- Outputs:
  - an atomic integer,

## Description

Use this to initialize a new atomic integer.

    i1 : new AtomicInt from 5

    o1 = 5

    o1 : AtomicInt

If x is not given, then the initial value is 0.

    i2 : new AtomicInt

    o2 = 0

    o2 : AtomicInt

## Ways to use this method:

- new AtomicInt from ZZ -- initialize an atomic integer

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Macaulay2Doc/doc_atomic.m2:52:0.