Let me describe my question with a concrete sample. For print-in-order to collaborate order of different functions, I used method below:
class Foo{ mutex