We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1aa7a02 commit 9aa9c67Copy full SHA for 9aa9c67
1 file changed
pkg/utils/mailbox/mailbox.go
@@ -20,6 +20,7 @@ type Mailbox[T any] struct {
20
capacity uint64
21
// onCloseFn is a hook used to stop monitoring, if non-nil
22
onCloseFn func()
23
+ newParam uint32
24
}
25
26
// NewHighCapacity create a new mailbox with a capacity
@@ -42,6 +43,7 @@ func New[T any](capacity uint32) *Mailbox[T] {
42
43
chNotify: make(chan struct{}, 1),
44
queue: make([]T, 0, queueCap),
45
capacity: uint64(capacity),
46
+ newParam: capacity,
47
48
49
0 commit comments