pthread mutex restrictions
Posted: Sat Feb 21, 2009 8:13 am
hi
i am trying to make the json-c library thread-safe and i need to use pthread_mutex_t's for that
the approach is to introduce a field of type pthread_mutex_t in struct json_object
this way i can lock a json object before making a put/get etc., and unlock it afterwards
we need this at our company for a project where in the end many thousands of such json objects will reside in memory, and we were wondering whether there are any restrictions as to how many mutexes an application may have in use and/or whether we are going to run into performance problems?
does any one have an idea?
thanks
martin
i am trying to make the json-c library thread-safe and i need to use pthread_mutex_t's for that
the approach is to introduce a field of type pthread_mutex_t in struct json_object
this way i can lock a json object before making a put/get etc., and unlock it afterwards
we need this at our company for a project where in the end many thousands of such json objects will reside in memory, and we were wondering whether there are any restrictions as to how many mutexes an application may have in use and/or whether we are going to run into performance problems?
does any one have an idea?
thanks
martin