What's the difference between an exclusive lock and a shared lock?
问题 According to wikipedia, Shared locks are sometimes called "read locks" and exclusive locks are sometimes called "write locks". Can you explain the reasoning behind the terms "shared" and "exclusive"? 回答1: I wrote this answer down because I thought this would be a fun (and fitting) analogy: Think of a lockable object as a blackboard (lockable) in a class room containing a teacher (writer) and many students (readers). While a teacher is writing something (exclusive lock) on the board: Nobody