delete a mutex while it is locked
The behavior is undefined if the mutex is owned by any thread or if any thread terminates while holding any ownership of the mutex.
[1] https://stackoverflow.com/questions/34030156/deleting-a-mutex-that-is-locked
[2] https://en.cppreference.com/w/cpp/thread/mutex/~mutex