Keeps a list of callbacks, and calls them repeatedly, until the list doesn't change during the calls.
public class RetryingPoller
May be used to build your own TestInstructionExecutor. The behavior provided by this class is intended for running tests as fast as possible, assuming polling is a relatively cheap operation to execute, and that executing some operations may complete other wait conditions.
The implementation focuses on simplicity (of code) over performance. It's unlikely to become a performance bottleneck, but if this does happen for you, please consider opening an issue or contributing code for a more performant poller.
Calls all the registered callbacks at least once, and keeps calling them until none of the callbacks end up unregistering old callbacks or registering new callbacks.
public void Poll()
Registers a callback to be called at least once when Poll() is called.
public IDisposable RegisterPollCallback(Action action)
Callback to be called
A disposable, which will remove this callback when disposed.