max0x7ba / atomic_queue

C++ lockless queue.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Throttling when idle

benstadin opened this issue · comments

Is it possible to throttle CPU usage when the queue is basically idle? Like exponentially increase pause time until some upper limit in case no data is inflight?

There currently no such functionality.

When a consumer calls try_pop and it returns false you can then pass the control flow to your throttling policy.