Package proton :: Module utils :: Class AtomicCount

[frames] | no frames]

# Class AtomicCount

source code

    object --+
             |
            AtomicCount

Instance Methods

__init__(self, start=0, step=1) Thread-safe atomic counter. | source code

next(self) Get the next value | source code

Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Properties
Inherited from `object`: `__class__`

Method Details

### __init__(self, start=0, step=1)
(Constructor)

source code

Thread-safe atomic counter. Start at start, increment by step.

Overrides: object.__init__