circuitree.utils.AtomicCounter

class circuitree.utils.AtomicCounter

A simple thread-safe counter. Uses itertools.count(), which is implemented in C as an atomic operation. Can be used, for example, to track the total number of elapsed iterations across threads.

REQUIRES CYPTHON

From StackOverflow user ‘PhilMarsh’:

https://stackoverflow.com/a/71565358

__init__()

Methods

__init__()

increment()

value()