File tree Expand file tree Collapse file tree 2 files changed +14
-16
lines changed Expand file tree Collapse file tree 2 files changed +14
-16
lines changed Original file line number Diff line number Diff line change @@ -26,25 +26,24 @@ type IDGenerator struct {
2626var _ sdktrace.IDGenerator = & IDGenerator {}
2727
2828// Lock is used to lock the IDGenerator for concurrent use.
29+ // noop method to satisfy the sync.Mutex interface.
2930//
3031// Deprecated: mutex is internal and shall not be used.
31- func (gen * IDGenerator ) Lock () {
32- gen .mu .Lock ()
33- }
32+ func (* IDGenerator ) Lock () {}
3433
3534// TryLock attempts to lock the IDGenerator for concurrent use.
35+ // noop method to satisfy the sync.Mutex interface.
3636//
3737// Deprecated: mutex is internal and shall not be used.
38- func (gen * IDGenerator ) TryLock () bool {
39- return gen . mu . TryLock ()
38+ func (* IDGenerator ) TryLock () bool {
39+ return false
4040}
4141
4242// Unlock is used to unlock the IDGenerator for concurrent use.
43+ // noop method to satisfy the sync.Mutex interface.
4344//
4445// Deprecated: mutex is internal and shall not be used.
45- func (gen * IDGenerator ) Unlock () {
46- gen .mu .Unlock ()
47- }
46+ func (* IDGenerator ) Unlock () {}
4847
4948// NewSpanID returns a non-zero span ID from a randomly-chosen sequence.
5049func (gen * IDGenerator ) NewSpanID (context.Context , trace.TraceID ) trace.SpanID {
Original file line number Diff line number Diff line change @@ -96,25 +96,24 @@ func New(
9696}
9797
9898// Lock is used to lock the Sampler for concurrent use.
99+ // noop method to satisfy the sync.RWMutex interface.
99100//
100101// Deprecated: mutex is internal and shall not be used.
101- func (s * Sampler ) Lock () {
102- s .mu .Lock ()
103- }
102+ func (* Sampler ) Lock () {}
104103
105104// TryLock attempts to lock the Sampler for concurrent use.
105+ // noop method to satisfy the sync.RWMutex interface.
106106//
107107// Deprecated: mutex is internal and shall not be used.
108- func (s * Sampler ) TryLock () bool {
109- return s . mu . TryLock ()
108+ func (* Sampler ) TryLock () bool {
109+ return false
110110}
111111
112112// Unlock is used to unlock the Sampler for concurrent use.
113+ // noop method to satisfy the sync.RWMutex interface.
113114//
114115// Deprecated: mutex is internal and shall not be used.
115- func (s * Sampler ) Unlock () {
116- s .mu .Unlock ()
117- }
116+ func (* Sampler ) Unlock () {}
118117
119118// ShouldSample returns a sampling choice based on the passed sampling
120119// parameters.
You can’t perform that action at this time.
0 commit comments