3 ms·
Why not spawn a thread for disk io? It's a common pattern and frees up your main thread.
by viraptor 4y ago
Why not spawn a thread for disk io? It's a common pattern and frees up your main thread.
- jzwinck 4y agoSure, every application does that, but the kernel could do it better. What if I'm writing to two filesystems and one of them might have high latency sometimes? Do I make two threads for disk I/O to avoid starving one write when another is slow? The reasons for multiplexing network I/O apply to disk as well.