liburing icon indicating copy to clipboard operation
liburing copied to clipboard

two threads: a thread only submits, another only peek_batch_cqe, is safety?

Open learnisgood opened this issue 2 years ago • 1 comments

two threads, a thread only submits, another only peek_batch_cqe, is safety?

learnisgood avatar Feb 11 '23 12:02 learnisgood

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.

isilence avatar Feb 20 '23 14:02 isilence