4 ms·
Note this is specifically about opening and closing files, which may be on network mounts. kqueue has no support for this, io_uring just very recently got it. S
by ridiculous_fish 6y ago
Note this is specifically about opening and closing files, which may be on network mounts. kqueue has no support for this, io_uring just very recently got it. So there's no alternative to threads today.
- halayli 6y agokqueue does support this via EVFILT_VNODE. io_uring is in linux as of kernel 5.1(march 2020). alternatives are available but might not be viable for everyone.
- ridiculous_fish 6y agoMy understanding is that kqueue can notify for file events like "readable" or "opened," but cannot actually initiate reading or opening.
- halayli 6y agokqueue is not responsible for initiation. It's responsible to notify you about events. when you open(2) a file with O_NONBLOCK flag, you can register it with kqueue to let you know when it's readable/writable.