I read somewhere:
"With a mutex, only one thread can own it at any given moment. With a semaphore, multiple threads can own it at a time."
I don't understan why to allow multiple threads own a semaphore at the same time. Isn't that a new potential synchronization problem?
If someone explain me in which situations to use mutex and in which situations to use semaphores?