Right now, the logic for removing events without EV_PERSIST is implemented independently in every event handler. That's duplicate code, and that's unfortunate.
Worse still, it makes writing an efficient win32 select-based handler hard. The reasonable algorithm is (assuming a socket-to-event map):
for sockets in readfds:
for sockets in writefds:
But if we need to handle removing non-persistent events as we call event_active, it's harder to later add EV_WRITE to the now non-pending event.
Instead, could setting EV_PERSIST make event.c delete events before it calls their callbacks? That would remove duplicate code, simplify backends, and make win32.c less totally awful.