A PEP-3156 compatible event loop