You need to create a class for many users to use. Each instance of the class represents one user, but all the users share of a central local resource. However, the access to the resource must be serialized. In this case, critical section protection rely on some OS features such as mutex,semaphore or something else. Being the only user to this central resource, to encapsulate this critical section protection mechanism into this class, don't you think you can make use of some static members so that only 1 instance of the mutex/semaphore will be allocated for all the instances of the same class?
Please think about the use case. Many C++ development heavily rely on static members and functions. If you don't use it, it doesn't mean other people don't make use of this feature. On the contrary, many industries heavily rely on this feature. One example could be the hardware resource sharing in the performance critical areas such as military and industry applications...
Please think about the use case. Many C++ development heavily rely on static members and functions. If you don't use it, it doesn't mean other people don't make use of this feature. On the contrary, many industries heavily rely on this feature. One example could be the hardware resource sharing in the performance critical areas such as military and industry applications...