Open KierannCode opened 3 years ago
Little warning here : a destructor should never throw an exception. In this case, a check of the state of the mutex must be done in the destructor, and log a warning (maybe an error) if the mutex was locked when it was called.
The mutex implementation relies only SDL implementation. Therefore, bad use results in undefined behavior. It would be better to have exceptions thrown instead, but this might affect global performance, and thus should be implemented in the dev branch