You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Worker with ZeroMQ does not work on Windows with default configuration #524
Asynchronous ZeroMQ does not work on Windows with default asyncio.WindowsProactorEventLoopPolicy.
It raises:
RuntimeError: Proactor event loop does not implement add_reader family of methods required for zmq. zmq will work with proactor if tornado >= 6.1 can be found.
Use `asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy())` or install 'tornado>=6.1' to avoid this error.
If I install tornado as required by the exception, then the worker starts, but there is a warning that I need to configure the eventloop.
RuntimeWarning: Proactor event loop does not implement add_reader family of methods required for zmq. Registering an additional selector thread for add_reader support via tornado. Use `asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy())` to avoid this warning.
self._get_loop()
Adding asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy()) to the application code has no effect for worker
We can add tornado as a platform-specific dependency when we use the optional zmq dependency. With this, the worker will start, but the warning will remain
We can add a check that pyzmq is installed and os.name == 'nt' and then change the default EventLoopPolicy to WindowsSelectorEventLoopPolicy when worker starts
To be honest, I can't say exactly what side effects the second option might have, but I tested on pure pyzmq and it worked without a tornado
changed the title [-]Bug: Worker with ZeroMQ does not work on Windows with default configuration[/-][+]Worker with ZeroMQ does not work on Windows with default configuration[/+]on Sep 17, 2026
The second option seems more optimal to me. I don't have Windows handy to test it myself, so if you try it out and come up with a fix, I'd be happy to review it)
Activity
raidzin commentedon Oct 24, 2025
@s3rius, I see two ways to solve this problem:
tornadoas a platform-specific dependency when we use the optionalzmqdependency. With this, the worker will start, but the warning will remainpyzmqis installed andos.name == 'nt'and then change the defaultEventLoopPolicytoWindowsSelectorEventLoopPolicywhen worker startsTo be honest, I can't say exactly what side effects the second option might have, but I tested on pure
pyzmqand it worked without atornado[-]Bug: Worker with ZeroMQ does not work on Windows with default configuration[/-][+]Worker with ZeroMQ does not work on Windows with default configuration[/+]danfimov commentedon Sep 17, 2026
The second option seems more optimal to me. I don't have Windows handy to test it myself, so if you try it out and come up with a fix, I'd be happy to review it)