There is no such thing (currently) as thread-specific storage in C++. If you were to make m_fibonacci_values static it would result in m_fibonacci_values being shared between all object instances of the class "threaded_class." With the most basic usage case there will only be one "threaded_class" in existence in our application.
If you did make it static *and* you had more than one "threaded_class" it would almost certainly cause a crash as the various objects would step on each other with their shared data...
The confusion you are having may be coming from the function "start_thread" which is static. However, that static method class the non-static do_work and allows for the threads to share m_fibonacci_values.
Recent comments
13 hours 23 min ago
18 hours 27 min ago
18 hours 56 min ago
1 day 11 hours ago
1 day 18 hours ago
1 week 6 days ago
3 weeks 12 hours ago
3 weeks 1 day ago
3 weeks 3 days ago
3 weeks 4 days ago