Signal the next thread waiting on the condition variable instead of broadcasting to all threads
Use a guard clause early in the #release method rather than conditionally deleting and always signalling the condition variable.