It is safe to destroy an initialized semaphore upon which no threads are currently blocked. The effect of destroying a semaphore upon which other threads
are currently blocked is undefined.
EBUSY The implementation has detected an attempt to destroy the object referenced by mutex while it is locked or referenced (for example, while being used
in a pthread_cond_timedwait() or pthread_cond_wait()) by another thread.