I want to translate some Java code into C++. One of the Java classes extends the Thread class and contains the following method:
public static synchronized String createUniqueID() {
//some code here
}
How can I synchronize (in the Java sense of the word) class methods in C++ using Boost? I have read about using boost::mutex
for synchronizing access to shared data, but I am not sure how to apply this to C++ class methods.