I believe that in this context the idea of “modernizing” and “downgrading” is based on the idea that blocking the reader is, in a sense, a “weaker” blocking than blocking the writer. When a write lock is obtained, no other threads will be able to obtain a lock in any form, while when a reader is locked, any other thread can get a read lock if it wants.
Here, “lowering” the lock means that if you hold a write lock, you can switch to holding only a read lock by receiving a read lock and then letting go of the write lock. This means that you may have a thread that starts doing something critical (to prevent other threads from reading), does its job, and then switches to a lower priority lock (read lock) without being without a lock, This allows you to hold the lock continuously without unloading it.
However, the other way does not work - after you hold the read lock, you cannot “refresh” by holding the more important write lock, trying to get the write lock. If you try to do this, the thread will simply be blocked until it is interrupted.
Hope this helps!
templatetypedef
source share