Skip to content

Commit

Permalink
fix: ring loop
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Jul 28, 2023
1 parent a5f46e1 commit 2b719f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ring.go
Expand Up @@ -61,9 +61,9 @@ func (evr *eventRing) loop(latency, maxwait time.Duration, process func([]byte,
continue
}
process(it.response, it.caller, maxwait)
atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(&r[i])), unsafe.Pointer(nil))
it.response = nil
it.caller = nil
atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(&r[i])), unsafe.Pointer(nil))
c++
runtime.GC()
}
Expand Down

0 comments on commit 2b719f2

Please sign in to comment.