Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why not spawn a thread for disk io? It's a common pattern and frees up your main thread.


Sure, 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: