Questions tagged [shared-lock]
3 questions
139
votes
5 answers
What's the difference between an exclusive lock and a shared lock?
According to wikipedia:
Shared locks are sometimes called "read locks" and exclusive locks are sometimes called "write locks".
Can you explain the reasoning behind the terms "shared" and "exclusive"?

Rose Perrone
- 61,572
- 58
- 208
- 243
0
votes
2 answers
Is `std::shared_mutex` virtually a superset of `std::mutex`?
std::shared_mutex can provide an exclusive lock like std::mutex. Plus it extends the synchronization capabilities by allowing the parallel read-only accesses to the multiple threads.
Under the hood the number of machine instructions might be lesser…

iammilind
- 68,093
- 33
- 169
- 336
0
votes
0 answers
Deadlock with ShareLock problem on transaction on update
I am seeing this error in my RDS logs in Postgresql.
Id column is Primary Key in my table.
I also logged the queries in server site and seen that both statements have different IDs.
Do you have any idea how can I fix this ?
Process 3095 waits for…

ahmet gül
- 193
- 1
- 11