Skip to content

Commit

Permalink
not calling get
Browse files Browse the repository at this point in the history
  • Loading branch information
absolutelightning committed May 28, 2024
1 parent de51dea commit 38c6dcd
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
5 changes: 3 additions & 2 deletions node_16.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,9 @@ func (n *Node16[T]) ReverseIterator() *ReverseIterator[T] {
}

func (n *Node16[T]) createNewMutateChn() chan struct{} {
n.setMutateCh(make(chan struct{}))
return n.getMutateCh()
muCh := make(chan struct{})
n.setMutateCh(muCh)
return muCh
}

func (n *Node16[T]) incrementLazyRefCount(val int32) int32 {
Expand Down
5 changes: 3 additions & 2 deletions node_256.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,9 @@ func (n *Node256[T]) ReverseIterator() *ReverseIterator[T] {
}

func (n *Node256[T]) createNewMutateChn() chan struct{} {
n.setMutateCh(make(chan struct{}))
return n.getMutateCh()
muCh := make(chan struct{})
n.setMutateCh(muCh)
return muCh
}

func (n *Node256[T]) incrementLazyRefCount(val int32) int32 {
Expand Down
5 changes: 3 additions & 2 deletions node_4.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,9 @@ func (n *Node4[T]) ReverseIterator() *ReverseIterator[T] {
}

func (n *Node4[T]) createNewMutateChn() chan struct{} {
n.setMutateCh(make(chan struct{}))
return n.getMutateCh()
muCh := make(chan struct{})
n.setMutateCh(muCh)
return muCh
}

func (n *Node4[T]) incrementLazyRefCount(val int32) int32 {
Expand Down
5 changes: 3 additions & 2 deletions node_48.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,9 @@ func (n *Node48[T]) ReverseIterator() *ReverseIterator[T] {
}

func (n *Node48[T]) createNewMutateChn() chan struct{} {
n.setMutateCh(make(chan struct{}))
return n.getMutateCh()
muCh := make(chan struct{})
n.setMutateCh(muCh)
return muCh
}

func (n *Node48[T]) incrementLazyRefCount(val int32) int32 {
Expand Down
5 changes: 3 additions & 2 deletions node_leaf.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,9 @@ func (n *NodeLeaf[T]) ReverseIterator() *ReverseIterator[T] {
}

func (n *NodeLeaf[T]) createNewMutateChn() chan struct{} {
n.setMutateCh(make(chan struct{}))
return n.getMutateCh()
muCh := make(chan struct{})
n.setMutateCh(muCh)
return muCh
}

func (n *NodeLeaf[T]) getRefCount() int32 {
Expand Down

0 comments on commit 38c6dcd

Please sign in to comment.