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’:
- __init__()
Methods
__init__
()increment
()value
()