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

> Synchronous I/O looks appealing for beginners and simple projects.

Yes. And.

Synchronous I/O is suitable for almost all projects

When it is unsuitable it is catastrophicly unsuitable,



Synchronous I/O is actually better than async for many programs, partly because almost all async systems were designed without thinking about priority inversions and can't resolve them properly. If you have futures, you have this problem.


Since the NT kernel is async throughout, it solves this with periodic priority boosts for non-running but runnable threads.

I swear, the kernel designers just need to look at NT :-P But we're well beyond a complete rewrite of old kernels, sadly.


That can work but I think it's cheating. Especially if your scheduling is tied into power management or you have high/low power cores, then boosting the low priority threads will waste power.


Forgot to say, the correctly designed ones are called "structured concurrency".




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

Search: