Closed cpporhair closed 8 months ago
Hi I use thread / per core to complete the logic. I want to be able to handle other tasks if there are no io completion events.
Is there any potential risk in using io_uring_wait_cqe_nr(&ring, &cqe, 0) if I want to get the completion event in a non-blocking way?
Or do you have a better way to do it?
That should work, or you can use io_uring_peek_cqe() which will check for a cqe without blocking.
OK.thx~~~
Hi I use thread / per core to complete the logic. I want to be able to handle other tasks if there are no io completion events.
Is there any potential risk in using io_uring_wait_cqe_nr(&ring, &cqe, 0) if I want to get the completion event in a non-blocking way?
Or do you have a better way to do it?