23 ms·
So I'm not 100% certain on this, but this flow seems like like it would be a good candidate for atomic.Value[0]? The the mutexes could be removed entirely. That
by kyrra 10y ago
So I'm not 100% certain on this, but this flow seems like like it would be a good candidate for atomic.Value[0]? The the mutexes could be removed entirely. That way you don't need to get a lock on every config read.
[0] https://golang.org/pkg/sync/atomic/#example_Value_config https://golang.org/pkg/sync/atomic/#example_Value_config
- diogomonicapt 10y agoAuthor here, I actually added a footnote exactly because of that fact: https://diogomonica.com/2017/01/11/hitless-tls-certificate-rotation-in-go/#fn:3 https://diogomonica.com/2017/01/11/hitless-tls-certificate-r...