Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

Add a pthreads fallback for thread_local #30

Closed
wants to merge 3 commits into from

Conversation

kwasimensah
Copy link

Some platforms don't properly support thread_local (android/ndk#8). So this adds a pthread based work around. It still defaults to using thread_local.

@ta0kira
Copy link
Contributor

ta0kira commented Nov 14, 2017

As discussed offline, we're going to hold off on this and limit support to compilers that properly implement C++11 thread_local.

Summary of rationale:

  • There is no simple way to support non-compliant compilers without either complicating the implementation for compliant compilers or branching the sources.
  • Branching the sources (even with #ifdef gating) would be problematic because of the thread_local in template code. This is because it would potentially require conditional build logic in multiple places in the user's code.
  • At this point, I don't want to add a custom thread-local implementation or an equivalent dependency.

@ta0kira ta0kira closed this Nov 14, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants