Convert registry.go to use a for-select loop instead of locks.