0

If I understand correct if I use fair mode

read and write locks doesn't have priorities and all locks will be acquired on order of the requesting by other threads. After write request receiving - if

But I am not sure about non-fair mode. As written in concurrency in practice it is some sort of random.

But I am not fully inderstand this.

If I understand correct most profit of usage RWL that readers can read in parallel.

But Lets imagine that we have a lot of read operations. Lets say several threads constantly hold read lock(single read is not long but two neighbours read always overlaps). And sometimes write operation occures.

Does write operations will be executed eventually?

gstackoverflow
  • 36,709
  • 117
  • 359
  • 710

0 Answers0