Skip to content

vllm.utils.counter

Classes:

AtomicCounter

An atomic, thread-safe counter.

Methods:

  • __init__ –

    Initialize a new atomic counter to given initial value.

  • dec –

    Atomically decrement the counter by num and return the new value.

  • inc –

    Atomically increment the counter by num and return the new value.

__init__(initial=0)

Initialize a new atomic counter to given initial value.

dec(num=1)

Atomically decrement the counter by num and return the new value.

inc(num=1)

Atomically increment the counter by num and return the new value.