event loop: run as background task