Reading concurrently is generally ok, but if there’s one writer all access must use the lock. More advanced locking systems have separate locks for read and write, so many readers can hold the read lock, but only one writer can hold the write lock (together with no readers). I think there used to be a package which implemented such locks, but I can’t find it. It’s a pity it’s not in Base
or an stdlib.