Reader/Writer Lock Illustrated
Multiple readers may hold
the lock concurrently in shared mode.
Writers always hold the lock in exclusive mode, and must wait for all readers or writer to exit.
mode read write max allowed
If each thread acquires the lock in exclusive (*write) mode, SharedLock functions exactly as an ordinary mutex.