What exactly are SelectorEventLoop and ProactorEventLoop? How are they different?
I was testing the use of asyncio and aiohttp in python on Windows, then got an error RuntimeError: Event loop is closed.
Looked up and found a workaround, but I did not understand the root of the error.
Many people seem to touch on the concept of SelectorEventLoop and ProactorEventLoop here and also here.
I read documentation but couldn't grasp the concept. Could anyone explain these concept in easier terms?
SelectorEventLoop, which is the default for most platforms (MacOS, Linux, etc.), andProactorEventLoop, which is the Windows-specific event-loop that is capable of making IO bound calls on Windows machines.SelectorEventLoopstill works on Windows, but only works with sockets, and not pipes. Since pipes are a process communication tool it requires more in-depth kernel-level implementations, and on Windows, it is named "I/O Completion Ports", which is whatProactorEventLoopuses.