'identifier' : 'thread' is only valid for data items of static extent
You cannot use the thread attribute with an automatic variable, nonstatic data member, or function parameter. Use the thread attribute for global variables, static data members, and local static variables only.