Issue #21758:implement locking