-
Currently send operation is seperated from multishot recv ring, because I have to ensure all send operation must be done before next internal recv shot. So my question is: does |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
There's no way to wait for specific completions, so if you do io_uring_submit_and_wait(ring, nr), then it'll return when 'nr' CQEs are available for you, regardless of where they come from. Generally, if you want to wait for N new receives to come in, you'd probably want to adjust your 'nr' so that it's N+submitted_sends. The sends will generally always complete during submission (unless you're overflowing the socket and it's out of space), hence you should expect the sends you're submitting here to be available in the ring at the time io_uring_submit() (or io_uring_submit_and_wait()) returns control to your application. |
Beta Was this translation helpful? Give feedback.
There's no way to wait for specific completions, so if you do io_uring_submit_and_wait(ring, nr), then it'll return when 'nr' CQEs are available for you, regardless of where they come from. Generally, if you want to wait for N new receives to come in, you'd probably want to adjust your 'nr' so that it's N+submitted_sends. The sends will generally always complete during submission (unless you're overflowing the socket and it's out of space), hence you should expect the sends you're submitting here to be available in the ring at the time io_uring_submit() (or io_uring_submit_and_wait()) returns control to your application.