liburing
liburing copied to clipboard
two threads: a thread only submits, another only peek_batch_cqe, is safety?
two threads, a thread only submits, another only peek_batch_cqe, is safety?
It is safe. Be careful with old kernels, rings should have IORING_FEAT_EXT_ARG to be capable to safely wait on CQ with timeouts, e..g io_uring_wait_cqe_timeout().
Note, any more complex types of sharing would require some synchronisation around queues' access.