dwrensha/gj

Never deregister?

Closed this issue · 2 comments

Donno if it's the place to discuss such things. Sorry in advance.

Maybe I'm wrong, but I find that the events never deregister from mio. Is that ok?

Thanks for asking! epoll() automatically removes descriptors that have been closed, and I think that kevent() acts roughly the same. However, I had not realized until just now that there could be a problem if a file descriptor is dup()ed, as can happen through the try_clone() call. ( see Q6 in http://man7.org/linux/man-pages/man7/epoll.7.html ) I may need to deregister, after all!

Fixed in 80b5d27.