Made sf::Mutex recursive on Unix, the behaviour is now consistent across platforms
This commit is contained in:
parent
f0ed4ba446
commit
df61292f65
2 changed files with 17 additions and 5 deletions
|
@ -35,7 +35,12 @@ namespace priv
|
|||
////////////////////////////////////////////////////////////
|
||||
MutexImpl::MutexImpl()
|
||||
{
|
||||
pthread_mutex_init(&myMutex, NULL);
|
||||
// Make it recursive to follow the expected behaviour
|
||||
pthread_mutexattr_t attributes;
|
||||
pthread_mutexattr_init(&attributes);
|
||||
pthread_mutexattr_settype(&attributes, PTHREAD_MUTEX_RECURSIVE);
|
||||
|
||||
pthread_mutex_init(&myMutex, &attributes);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue