Am 10.07.2012 22:52, schrieb Dann Corbit:
It looks that gcc and clang are actively moving towards implementing it.
In contrast to C99 some parts of the old and new standard are now
optional, so this will ease the transition for some compilers.
Clang is actually already quite advanced in its C11 support, all direct
language level features seems to be implemented, in particular _Generic
and _Atomic.
But as always with these things the required library support is more
involved, so complete probably still will lack for a certain time. Some
things are relatively "easy": support for atomics is already there in
extensions with a different syntax, and implementing C11 threads on top
of POSIX threads is not very difficult either, a good exercise for an
experienced programmer.
Writing your own thread wrapper library is almost certainly a mistake.
There is the existing ACE wrappers, there is the boost threading API,
and there is the Pthreads wrapper also (which does not require C++ like
the other two). All of these are tested and debugged and fairly easy to
use. It would be nice (of course) to have a single threading API that
can be used anywhere and this is likely the goal of these compiler
advances (C++ beat C to the punch in having a standardized threading API
but it is not universally implemented yet either).
To roll your own version is another gob of code to maintain that
supposedly is going to be replaced soon by "the real thing."
If it never does get replaced then it was a complete waste of effort and
if it does get replaced then it is a small waste of effort.
In either case, I think I would train my energies on other portions of
the project.
I do most of my real programming in C++. For me, C is for hobby
programming, mostly chess programs.
I am, of course, interested in any new language features that make my
life easier and I am especially interested in them if they actually come
to fruition.