A class that encapsulates the registering and calling of a callback function.
Users can attach a lambda that can later be called at an appropriate moment.