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

see issue #124
my mistake! reverted