Community
cancel
Showing results for 
Search instead for 
Did you mean: 
renorm
Beginner
41 Views

static mutex members

Hi.
Can a class have a static mutex member? Is this code OK?
[cpp]// in some header file
struct A
{
   static tbb::mutex mut;
};

// in some implementation file
tbb::mutex A::mut;[/cpp]
Thank you,
renorm.
0 Kudos
1 Reply
Dmitry_Vyukov
Valued Contributor I
41 Views

Quoting renorm
Can a class have a static mutex member? Is this code OK?

Yes. Nothing special about mutexes in this respect.

Reply