We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 34ddd7f + b350175 commit 5efb7a9Copy full SHA for 5efb7a9
task/stream2/stream2_executor.go
@@ -58,6 +58,7 @@ func (s *stream2Executor) run(mu *sync.Mutex) bool {
58
var f func() bool
59
for i := 0; ; i++ {
60
if mu != nil {
61
+ // 加锁
62
mu.Lock()
63
}
64
@@ -76,6 +77,14 @@ func (s *stream2Executor) run(mu *sync.Mutex) bool {
76
77
return false
78
79
80
+ if i >= len(s.list) {
81
+ s.list = s.list[0:0]
82
+ if mu != nil {
83
+ mu.Unlock()
84
+ }
85
+ return false
86
87
+
88
f = s.list[i]
89
s.list[i] = nil
90
0 commit comments