The following function adds four threads. Three threads compete for the semaphore, which is set to a count of one. A slower thread calls notify_one(), allowing one of the waiting threads to proceed.
The result is that s1 immediately starts spinning, causing the Semaphore's usage count to remain be...