Skip to content

C++11 TLS simulation#2

Open
DNikolaevAtRocket wants to merge 1 commit into
zopencommunity:zopen2from
DNikolaevAtRocket:zopen2
Open

C++11 TLS simulation#2
DNikolaevAtRocket wants to merge 1 commit into
zopencommunity:zopen2from
DNikolaevAtRocket:zopen2

Conversation

@DNikolaevAtRocket
Copy link
Copy Markdown

The PR is re-targeted ibmruntimes#111.

The PR implements TLS simulation in C++11 addressing ibmruntimes#108.
It's supposed to be functionally complete.

Another goal is to make porting of C++11 code (or higher levels) using thread_local as seamless as possible.

Example:

// Original:
// thread_local std::string name = "default";

// Simulation:
static __tls<std::string> tls_name;
auto &name = tls_name.get([]{ return std::string("default"); });

// ...
name = "updated";

Thanks!

Signed-off-by: Dmitry Nikolaev <dnikolaev@rocketsoftware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants