Skip to content

Page 97, thread_local object #44

@jpc0016

Description

@jpc0016

I cannot replicate results in Listing 4-7 with code in Listing 4-6. "Tracer" (line 17) is not recognized as an object when using "thread_local" keyword; however, "Tracer" is recognized when I use "static" keyword and I get the output in Listing 4-7. I added the "thread" header file, #include <thread>, and it still did not work. Both clang++ and g++ are up to date which should support threading. Help is appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions