Opened 7 years ago
Last modified 6 years ago
#43 accepted defect
Fix thread_local
| Reported by: | Vladimír Štill | Owned by: | mornfall |
|---|---|---|---|
| Priority: | major | Milestone: | 4.5 |
| Component: | VM | Keywords: | |
| Cc: |
Description
Currently, the thread_local keyword is not supported. Even worse, it is silently ignored:
#include <thread>
#include <cassert>
thread_local int v;
int main()
{
v = 42;
std::thread t( [] {
assert( v == 0 );
v = 16;
assert( v == 16 );
} );
assert( v == 42 );
t.join();
}
Change History (3)
comment:1 Changed 7 years ago by
| Milestone: | future → 5.0 |
|---|
comment:2 Changed 7 years ago by
| Milestone: | 5.0 → 4.3 |
|---|
Indeed, this leads to LLVM thread_local. Same thing happens with function-scoped thread_local variables. Let's aim for 4.3.
comment:3 Changed 6 years ago by
| Milestone: | 4.3 → 4.5 |
|---|---|
| Status: | new → accepted |
Note: See
TracTickets for help on using
tickets.
Milestone renamed