Support read/write locking.
Merge remote-tracking branch 'origin/master'