Why not create a class that inherits from mutex? This would establish a perfect is-a relationship. Using the mutex object as a member variable for encapsulation, as shown in the sample code, forms a has-a relationship, which deviates a bit from what was explained in the video. However, this is just a difference in implementation and does not affect the final usage demonstration. I hope to get an answer for this.
Why not create a class that inherits from mutex? This would establish a perfect is-a relationship. Using the mutex object as a member variable for encapsulation, as shown in the sample code, forms a has-a relationship, which deviates a bit from what was explained in the video. However, this is just a difference in implementation and does not affect the final usage demonstration. I hope to get an answer for this.