MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / Has

Method Has

internal/utils/sets/set_fixed.go:47–53  ·  view source on GitHub ↗
(item any)

Source from the content-addressed store, hash-verified

45}
46
47func (this *FixedSet) Has(item any) bool {
48 this.locker.RLock()
49 defer this.locker.RUnlock()
50
51 _, ok := this.m[item]
52 return ok
53}
54
55func (this *FixedSet) Size() int {
56 this.locker.RLock()

Callers 2

TestNewFixedSetFunction · 0.45
BenchmarkFixedSet_HasFunction · 0.45

Calls 2

RLockMethod · 0.80
RUnlockMethod · 0.80

Tested by 2

TestNewFixedSetFunction · 0.36
BenchmarkFixedSet_HasFunction · 0.36