Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1012007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T09:52:49+00:00 2026-05-16T09:52:49+00:00

C++0x adds a new storage specifier thread_local which is not yet implemented in VS10.

  • 0

C++0x adds a new storage specifier thread_local which is not yet implemented in VS10.

However the Parallel Programming Library defines a Concurrency::combinable class which has a local() function which Returns a reference to the thread-private sub-computation.

Are there semantics for thread_local that can’t be (easily) covered by having a static variable of type combinable<T>?

If not why was thread_local added to the core language if it can be implemented in a library?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T09:52:50+00:00Added an answer on May 16, 2026 at 9:52 am

    Why C++ added class objects whether it could be implemented by a library like something that GObject does in C? Because C++ wants class objects to be known at compile-time, this is more efficient. Therefore C++ class initialization/uninitialization is exception-safe (RAII).

    Some features are more major and needed more implementation to be made. thread_local is a storage class specifier, so it can be known at compile-time and compiler can do much more optimization.

    Also in http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2659.htm have said:

    Thread Variable Dynamic Initialization

    At present, all implementations of thread-local storage do not support dynamic initalization (and presumably non-trivial destructors). There was mild consensus at the Mont Treblant meeting to support dynamic initialization of function-local, thread-local variables. The intialization of such variables is already guarded and synchronous, so new technology is not required. On the other hand, the implementation for dynamic initialization of namespace-scope variables is much more difficult, and may require additional linker and operating system support.

    Why thread_local have been introduced as a new language keyword? It seems that the reason could be Thread Variable Dynamic Initialization.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have have some code which adds new cells to a table and fills
The new OS (3.0+) adds more features which speed up the development (like working
I have a button which adds new row in grid view at button click
Its adds new ones, but as far as I can see it does not
jqgrid edit and add forms coontain textareas which can edited and enter adds new
An stock data download class has a BarList to which it either adds new
I have an iPhone application that adds new contacts via the Address Book Framework.
Please help me to write a trigger that adds new rows to a table.
I have created a gem that adds a new method to the class ActiveRecord::Base.
I have an array an a timer that adds a new object to my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.