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

Function testDefer

testdata/atomic.go:102–111  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

100}
101
102func testDefer() {
103 n1 := int32(5)
104 n2 := uint32(6)
105 defer func() {
106 println("deferred atomic add:", n1)
107 println("deferred volatile store:", n2)
108 }()
109 defer atomic.AddInt32(&n1, 3)
110 defer volatile.StoreUint32(&n2, 22)
111}

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected