Hacker News new | ask | show | jobs
by 0d0a 993 days ago
Can you give some examples? When batching data, you benefit from picking something like io_uring. But for two-way communication, you still need to notify either side when data is ready (maybe you don't want to consume cpu just polling), and it isn't clear to me how those options handle that synchronization faster than pipes.
1 comments

The main thing io_uring gives you is avoiding multiple syscalls.

With a pipe you can’t really avoid that. With a shared memory queue/ring buffer you can write to the memory without any syscalls.

But you need to build synchronisation yourself (e.g., using semaphores for example). You don’t necessarily need to poll.