Some New Threads in Your Future


 
Guess how many times the word "thread" shows up in the C++ Language Standard.
 
Once.
 
That’s right. There’s no direct support in the language proper for multithreaded programming. Oh sure, keywords like volatile help programmers write correct C++ multithreaded code, and there are many decent threading classes available for C++. But professional game programmers live in this weird netherworld where we pretty much have to write multithreaded code (particularly for multi-core processors like Xbox 360 and Cell) and we yet don’t have C++ language-level primitives that provide multithreaded abstrations and protect us from synchronization and deadlock issues.
 
The good thing is that many really smart people are thinking about this problem. You can get a glimpse into what C++ with concurrency might look like by checking out this excellent article by Eric Niebler.
 
The bad thing is that official standardization is still a ways off. Although there’s good reason to believe we’ll have a new C++ Standard before the decade is out, it will inevitably take compilers a while to catch up. In the meantime, the struggle to write both correct and efficient multithreaded games will continue.
 
Advertisements
This entry was posted in C++. Bookmark the permalink.

2 Responses to Some New Threads in Your Future

  1. Unknown says:

    It’s very interesting to read your blog and I have much to ask 🙂 but can’t show my thoughts
    please, give me advice where (blog/site/smth) I can read good advices about programming culture (for novices)
    Thank you!

  2. Pete says:

    Programming culture is a really broad topic, and each programming industry has its own culture. For game programming, you can get a sense of the culture by visiting http://www.gamasutra.com and http://www.slashdot.org/games.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s