Why is there a lock thread here?