Live data from Hacker News

Multithreading in modern C++

modernescpp.com

31–40 of 41 posts

Re: Multithreading in modern C++

#31
post #28

It's been five years (and two standard revisions). Can we stop calling C++11 a new standard?

Tell that to embedded system guys still having to deal with C++98, not even C++03.

Really depends on where you go. In our office, we use C++11 functionality in our AVR chips.

Re: Multithreading in modern C++

#32
post #26

Earlier quoted context omitted.

1: Which ARM? (Designing for a Cortex M0+ is entirely different from an M3 is from ...) 2: What are your design contraints? (Do you have hard-real time requirements? If so, you're probably going to want to use the primitives that come with the RTOS (QNX/Green Hills Integrity/all-the-major-players have their own method of "IPC/threading/whatever you want to call it" and it's usually an Erlang-esque message passing com…

It was a ARM Cortex-A15 SoC. And we're going to have to use regular threads. Just look at this[1] (then get your manager to bring me in as a consultant - it pains me to hear you have "long-standing issues with an ARM port" and the way your team-lead thinks he can solve it is with unit tests). "Long time to load which sometimes fails entirely" is a race condition. Insure++ is the "Coverity" for embedded (just as expen…

Got you - inherited a codebase from someone else - worked fine on your x86(-64/whatever), tried it against your ARM, intermittent failures.

Seems compiling with the -O0 flag fixed some issues for a few chaps, worth a shot I'd imagine, though you've seemed to completed your alternate implementation for the ARM platform.

Alternatively, the TBB errors seem to be when using a gcc deriv that depends on GNU as. Now VS can build ARM binaries (at least, ARM LE bins). It'd be interesting to see if that solves the problem.

What did you end up using instead of TBB? Stock Pthreads/pth? Or did you go with something lighter? Regardless, next time you have to write for embedded stuff hopefully you have a new tool in your belt that'll save you from frustration :)

Re: Multithreading in modern C++

#33
post #23
post #14

Earlier quoted context omitted.

Wait, the domain is called "modernescpp.com", that's Modern s Cpp... not Modern Cpp. Wow, that's not good....

Assuming in German C++ is neuter, and referred to with the das article, Modernes Cpp is correct and singular.

> German C++ is neuter

neuter, was that intentional?

Re: Multithreading in modern C++

#34
post #23
post #14

Earlier quoted context omitted.

Wait, the domain is called "modernescpp.com", that's Modern s Cpp... not Modern Cpp. Wow, that's not good....

Assuming in German C++ is neuter, and referred to with the das article, Modernes Cpp is correct and singular.

It is.

Re: Multithreading in modern C++

#35
post #33
post #23

Earlier quoted context omitted.

Assuming in German C++ is neuter, and referred to with the das article, Modernes Cpp is correct and singular.

> German C++ is neuter neuter, was that intentional?

Hover over the n here: https://en.wiktionary.org/wiki/Plus#German

Re: Multithreading in modern C++

#37
post #28

Earlier quoted context omitted.

Tell that to embedded system guys still having to deal with C++98, not even C++03.

Really depends on where you go. In our office, we use C++11 functionality in our AVR chips.

Hey, could you elaborate on what C++11 features you use on AVR chips? Thanks in advance :)

Re: Multithreading in modern C++

#38

It's been five years (and two standard revisions). Can we stop calling C++11 a new standard?

Standards are not adopted overnight. C++11 is still, effectively, a "new" standard.

I realize that many projects haven't made the switch, and in some cases they have good reasons to be cautious. And I realize that many programmers aren't familiar with the various changes, even after five (or more) years to catch up.

But that doesn't change the age of the standard, or the fact that C++14 was published, and the Committee is finishing up C++17. At some point it's silly to call C++11 "new." "Unfamiliar," sure, but not "new." It reminds me of Larry Wall's talk ( http://www.wall.org/~larry/pm.html ) "Do you know when New College was founded. Any guesses? New College was new in 1379."

Re: Multithreading in modern C++

#39
post #28

Earlier quoted context omitted.

Tell that to embedded system guys still having to deal with C++98, not even C++03.

Really depends on where you go. In our office, we use C++11 functionality in our AVR chips.

Sure, but from what I understand by occasionally reading some electronic stuff, many commercial compiler vendors are not even C++03.

For example TI.

Re: Multithreading in modern C++

#40
post #23
post #14

Earlier quoted context omitted.

Wait, the domain is called "modernescpp.com", that's Modern s Cpp... not Modern Cpp. Wow, that's not good....

Assuming in German C++ is neuter, and referred to with the das article, Modernes Cpp is correct and singular.

No, I totally get that it is a German variant of the English expression "Modern C++", but you have a fair bit of overlap with a very well established brand in the C++ community...
Post reply on HN