4 ms·
> The Unix IO model isn't well designed and is far from the only Unix-ism to work poorly in the face of threads Right, threads in the form of pthreads should'v
by slrz 10y ago
> The Unix IO model isn't well designed and is far from the only Unix-ism to work poorly in the face of threads
Right, threads in the form of pthreads should've never been introduced into Unix, as they made a huge mess of many interfaces.
The rfork "you have processes that can share resources" model is a much better fit (although it doesn't solve all problems). It's what Linux as well as FreeBSD implement at the kernel level anyway except they add tons of ugly stuff on top of it to allow for performant implementations of POSIX threads semantics.