Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sync_example.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var dataLarge []byte
const size = 64 * 1024 // 65536

func benchmarkLargeSizePool(b *testing.B) {
var bytePool = sync.Pool{
bytePool := sync.Pool{
New: func() interface{} {
b := make([]byte, size)
return b
Expand All @@ -22,9 +22,9 @@ func benchmarkLargeSizePool(b *testing.B) {
_ = dataLarge
bytePool.Put(dataLarge)
}

m := new(sync.Map)

actual, ok := m.Load("key")
if ok {
m.Delete("key")
Expand Down