Ask Your Question

Revision history [back]

Throttling AsyncSpinner Rate

I am using AsyncSpinner to split a long duration callback off from callbacks invoked at a much higher rate. This ensures that the long duration callback doesn't effectively block or cause to overflow queues of information arriving at the higher rate.

I am profiling using intel vtune, and It shows that the spintime is significant. Particularly it is spinning on some pthread_mutex_lock. I think this is implemented in the AsyncSpinner. I would like to make spinner sleep in between periodic checks to callOne() or callAvailable().

Is there a way to do this?