Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for December 5, 2013
Deadline scheduling: coming soon?
LWN.net Weekly Edition for November 27, 2013
ACPI for ARM?
LWN.net Weekly Edition for November 21, 2013
If you don't like the new threading features don't use them. Sounds like you have no need for them, so it shouldn't be a problem for you.
A look at C++14, part 1
Posted Mar 31, 2013 14:06 UTC (Sun) by nix (subscriber, #2304)
So you like new stuff, but only the stuff you want, and you don't like anything else even if other people want it. Got it.
Posted Mar 31, 2013 20:58 UTC (Sun) by simlo (guest, #10866)
I am not against features in libraries: Those I can simply avoid.
I do have as I mentioned above (https://lwn.net/Articles/545352/) a thing against multi threading in general. And now C++ tries to jump the wagon, too.
The good thing about C++ is that it doesn't do much opposite for instance Java. There is no standeard for GUI either. STL is a library of containers and types you can use anywhere on any OS and without an OS (except for file IO).
Of course, to make portable multi threaded programs, wrappers around the OS specific implementations where needed. But then why not wrappers for sockets, serial ports etc?
Or put it another way: Was POSIX not a good enough wrapper?
Before STL and C++ was really not about portability. There weren't even a standeard like int32_t in C++. With threading, atomic types, chrono etc. STL have been given the task of supplying portability.
The thing about threads:
People learn to use threads all over the place. The excuse these days are scale-ability. But very rarely your program can scale anyway. The core reason for using threads is "that is what I am used to" and due to not being used to work with non-blocking IO.
What we need in general (not only C++) is _not_ more support for threading, but non-blocking APIs and a good framework for writing applications using non-blocking IO.
Posted Apr 1, 2013 11:43 UTC (Mon) by jwakely (subscriber, #60262)
Nonsense, people have been using Pthreads with C++ for decades. The *standard* didn't mention threads, but compilers live in the real world and had to deal with what programmers actually do.
You're making a silly leap from "some people don't use threads correctly" to "I wish noone was allowed to use threads." Luckily you're not actually involved in the standardisation process, you're just whining on the internet.
> What we need in general (not only C++) is _not_ more support for threading, but non-blocking APIs and a good framework for writing applications using non-blocking IO.
There are proposals to add such things to the next C++ standard, because the committee realises not everyone programs the same way and that different tools are suitable for different tasks. Maybe you would benefit from the same realisation.
Posted Apr 1, 2013 15:41 UTC (Mon) by tjc (subscriber, #137)
Posted Apr 1, 2013 23:05 UTC (Mon) by nix (subscriber, #2304)
Before the newest C++ standeard the compiler didn't know about threading. That is it could optimize away as it wanted. Only the OS knew about threading. Now the compiler have to lay out code, which can work in a multi-threaded environment.
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds