3 ms·
How do you deal with multi-threading in C89? If you rely on POSIX for your threading support, couldn't you argue that you are now dealing with something just as
by lalaland1125 9y ago
How do you deal with multi-threading in C89? If you rely on POSIX for your threading support, couldn't you argue that you are now dealing with something just as complicated, if not more complicated than C11?
Sometimes there is just unavoidable complexity for extremely useful features like thread support. Keeping stuff like that out of the standard doesn't necessary make the language simpler if you are forced to rely on other standards anyways ...
- kazinator 9y ago> How do you deal with multi-threading in C89? Certainly not by means of the abhorrent garbage that has been added to C for threading. POSIX is a standard. POSIX started as a branch of the Unix C library that didn't belong in the language. So for instance that's where "open" and "ioctl" went, while "printf" and "malloc" went to C. There is no need for C to start adding its own versions of POSIX requirements (let alone toy versions); it just adds complexity. Now what it means is that we can end up with some mongrel project where we have POSIX threads being spawned in one module, ISO C threads in another and so on.