4 ms·
I think it's actually pretty easy to implement a mutex with a semaphore. The opposite not so much. If you want extra debug checking, you can wrap the semaphore
by jeffbush 12y ago
I think it's actually pretty easy to implement a mutex with a semaphore. The opposite not so much. If you want extra debug checking, you can wrap the semaphore with another construct that sets the owner field on lock and checks it on unlock.