Closed edwintorok closed 1 year ago
Thanks for merging, there are still some other problems, e.g. 'oneshot' seems to be added to each event, so now after one event everything is still stuck.... (unless I keep changing epoll set)
I’ve been thinking about allowing users to specify one shot vs level triggered events. Both kqueue and epoll support it so this seems like an option worth surfacing. I liked the idea of one shot events so a readiness event is only reported once instead of multiple times, and then considering file descriptors always ready unless encountering EAGAIN
Giving control the user sounds right, I have no experience with kqueue
though, so I"ll leave that improvement idea to you.
I was testing the library and my code got "stuck", I tried using
Poll.set mux socket Poll.Event.write
to handleEINPROGRESS
fromconnect
, butstrace
was showing that the FD was not getting added to the epoll set. This was because the code thought no change was requested, sinceEvent.write
was equal toEvent.none
.