Build a lock that lets many readers in together but gives a writer exclusive access — using only a mutex and condition variables — and handle the cases where readers or writers could starve.
Build a lock that lets many readers in together but gives a writer exclusive access — using only a mutex and condition variables — and handle the cases where readers or writers could starve.
Opens with the full question.