documenting the event loop