MCPcopy
hub / github.com/tinygo-org/tinygo / Store

Method Store

src/sync/map.go:50–57  ·  view source on GitHub ↗
(key, value interface{})

Source from the content-addressed store, hash-verified

48}
49
50func (m *Map) Store(key, value interface{}) {
51 m.lock.Lock()
52 defer m.lock.Unlock()
53 if m.m == nil {
54 m.m = make(map[interface{}]interface{})
55 }
56 m.m[key] = value
57}
58
59func (m *Map) Range(f func(key, value interface{}) bool) {
60 m.lock.Lock()

Callers 15

TestMapLoadAndDeleteFunction · 0.95
TestMapSwapFunction · 0.95
testValueFunction · 0.45
ResetMethod · 0.45
DiscardMethod · 0.45
PutMethod · 0.45
txhandlerMethod · 0.45
sendFromRingMethod · 0.45
gcInterruptHandlerFunction · 0.45
runFunction · 0.45
mainFunction · 0.45

Calls 2

LockMethod · 0.65
UnlockMethod · 0.65

Tested by 4

TestMapLoadAndDeleteFunction · 0.76
TestMapSwapFunction · 0.76
TestMutexConcurrentFunction · 0.36