KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
when I try to make a map that has string as key and pthread_mutex_t as element, map<string, pthread_mutex_t> connectedClientsMutexes; pthread_mutex_t myMutex;//= PTHREAD_MUTEX_INITIALIZER; connectedClientsMutexes.insert(pair<string,pthread_mutex_t>(userName,myMutex)); while (1) { pthread_mutex_lock(&connectedClientsMutexes[userName]); // do something here } this generates: phase3: pthread_mutex_lock.c:312: __pthread_mutex_lock_full: Assertion `(-(e)) != 3 || !robust' failed.
Tags (comma-separated)
Save Edits
Cancel