Function copy_cqe [src]
Returns a copy of an I/O completion, waiting for it if necessary, and advancing the CQ ring.
A convenience method for copy_cqes() for when you don't need to batch or peek.
Prototype
pub fn copy_cqe(ring: *IoUring) !linux.io_uring_cqe
Parameters
ring: *IoUring
Source
pub fn copy_cqe(ring: *IoUring) !linux.io_uring_cqe {
var cqes: [1]linux.io_uring_cqe = undefined;
while (true) {
const count = try ring.copy_cqes(&cqes, 1);
if (count > 0) return cqes[0];
}
}