Using executors in an event loop