Add flush method that calls the callback without waiting for the queue
to reach the capacity limit.