Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

static mutex members

renorm
Beginner
98 Views
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
98 Views
Quoting renorm
Can a class have a static mutex member? Is this code OK?

Yes. Nothing special about mutexes in this respect.

Reply