Browse Source

feedback

pull/8134/head
tycho garen 3 years ago
parent
commit
65947dcfb7
2 changed files with 1 additions and 10 deletions
  1. +0
    -9
      internal/libs/clist/clist.go
  2. +1
    -1
      internal/libs/clist/clist_test.go

+ 0
- 9
internal/libs/clist/clist.go View File

@ -72,15 +72,6 @@ func (e *CElement) NextWait() *CElement {
} }
} }
// prevWaitChan can be used to wait until Prev becomes not nil. Once it does,
// channel will be closed.
func (e *CElement) prevWaitChan() <-chan struct{} {
e.mtx.RLock()
defer e.mtx.RUnlock()
return e.prevWaitCh
}
// NextWaitChan can be used to wait until Next becomes not nil. Once it does, // NextWaitChan can be used to wait until Next becomes not nil. Once it does,
// channel will be closed. // channel will be closed.
func (e *CElement) NextWaitChan() <-chan struct{} { func (e *CElement) NextWaitChan() <-chan struct{} {


+ 1
- 1
internal/libs/clist/clist_test.go View File

@ -320,7 +320,7 @@ FOR_LOOP:
FOR_LOOP2: FOR_LOOP2:
for { for {
select { select {
case <-prev.prevWaitChan():
case <-prev.prevWaitCh:
prev = prev.Prev() prev = prev.Prev()
seen++ seen++
if prev == nil { if prev == nil {


Loading…
Cancel
Save