do not capture pointers in ops queue closures (#2675)
This commit is contained in:
@@ -81,13 +81,12 @@ type opsQueueBase[T opsQueueItem] struct {
|
||||
}
|
||||
|
||||
func newOpsQueueBase[T opsQueueItem](params OpsQueueParams) *opsQueueBase[T] {
|
||||
oq := &opsQueueBase[T]{
|
||||
return &opsQueueBase[T]{
|
||||
params: params,
|
||||
ops: *deque.New[T](min(bits.Len64(uint64(params.MinSize-1)), 7)),
|
||||
wake: make(chan struct{}, 1),
|
||||
doneChan: make(chan struct{}),
|
||||
}
|
||||
oq.ops.SetMinCapacity(uint(min(bits.Len64(uint64(oq.params.MinSize-1)), 7)))
|
||||
return oq
|
||||
}
|
||||
|
||||
func (oq *opsQueueBase[T]) Start() {
|
||||
|
||||
Reference in New Issue
Block a user