Hacker News new | ask | show | jobs
by the8472 1831 days ago
You can use io_uring as a synchronous API too. Put a bunch of commands on the submission queue (think of it as a submission "buffer"), call io_uring_enter() with min_complete == number of commands and once the syscall returns extract results from the competion buffer^H^H^Hqueue. Voila, a perfectly synchronous batch syscall interface.

You can even choose between executing them sequentially and aborting on the first error or trying to complete as many as possible.