feature: a callback on each iteration of the waiting loop