jacinle.concurrency.counter#

Classes

Counter

CounterBasedEvent

Thread-safe counter-based callback invoker.

CounterBasedMonitor

Class Counter

class Counter[source]#

Bases: object

__init__()[source]#
__new__(**kwargs)#
get()[source]#
tick()[source]#

Class CounterBasedEvent

class CounterBasedEvent[source]#

Bases: object

Thread-safe counter-based callback invoker. When the counter is incremented, the system will check whether the counter has reached a target value. If so, the event will be set.

__init__(target, tqdm=None)[source]#
__new__(**kwargs)#
clear()[source]#
is_set()[source]#
tick()[source]#
wait(timeout=None)[source]#

Class CounterBasedMonitor

class CounterBasedMonitor[source]#

Bases: object

__init__(counters=None, display_names=None, interval=1, printf=None)[source]#
__new__(**kwargs)#
start()[source]#
tick(name=None)[source]#