master
兔子 3 years ago
parent 16ae4fae3d
commit 36dbdd5d27

@ -36,6 +36,7 @@ var (
stacks starmap.StarStack
stackStarted bool = false
stackStopChan chan int
stackMu sync.Mutex
stdScreen io.Writer = colorable.NewColorableStdout()
)
@ -145,11 +146,14 @@ func generateId() string {
}
func StartStacks() {
stackMu.Lock()
if stackStarted {
stackMu.Unlock()
return
}
go func() {
stackStarted = true
stackMu.Unlock()
defer func() {
stackStarted = false
}()

Loading…
Cancel
Save