1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-11-25 22:41:46 +02:00

Document the Reader and Exporter concurrent safe requirements (#4381)

This commit is contained in:
Tyler Yahn
2023-07-30 13:26:17 -07:00
committed by GitHub
parent bf29fc6f68
commit 2899fcfdca
4 changed files with 25 additions and 0 deletions

View File

@@ -168,6 +168,18 @@ func (ts *readerTestSuite) TestMethodConcurrentSafe() {
var wg sync.WaitGroup
const threads = 2
for i := 0; i < threads; i++ {
wg.Add(1)
go func() {
defer wg.Done()
_ = ts.Reader.temporality(InstrumentKindCounter)
}()
wg.Add(1)
go func() {
defer wg.Done()
_ = ts.Reader.aggregation(InstrumentKindCounter)
}()
wg.Add(1)
go func() {
defer wg.Done()