As part of a multi-threaded code that I am designing, I am using mutexes to control access to a shared data segments in the code. I have no problems initalising and manipulating the mutexes to control access, however terminating the mutex itself is proving to be a bit difficult.
I am terminating the mutex in the following way
Is this an appropriate way of terminating the mutex ? If not could someone please advise a much better strategy ?