Jump to content

C++ Language/Std/Multithreading/Semaphores/ReadersAndWriters

From Wikibooks, open books for an open world

Semaphores provide a solution to the classic "Readers and Writers Problem", where threads are either trying to read or write a file (multiple reads can occur concurrently, but writes require exclusive access).

Additional information about the Readers and Writers problem