digitalocean / prometheus-client-c

A Prometheus Client in C
Other
158 stars 78 forks source link

Can I use "pthread_rwlock_rdlock" in function "prom_map_get"? #35

Open cxyxiaoli opened 3 years ago

cxyxiaoli commented 3 years ago

In the prom_map_get function, the thread write lock (pthread_rwlock_wrlock) is used.Can I use thread-read locks instead?Would it be more efficiently to change "pthread_rwlock_wrlock" to "pthread_rwlock_rdlock"?