read lock is not required when writeLock is taken, since we know another write can't be concurrently happening (thanks to @pchapuis for pointing this out)