What does this do. In each iteration a new event is added and the new average is returned. Since the iterator does not care about when 'next' will be you can wait for incoming data and update each time something arrives. Nice! Maybe iter_average or update_average or average_online etc. would be even more appropriate names. Just throwing thoughts.