update vendor

master
兔子 3 years ago
parent d51f213e29
commit f62e9b9f40
Signed by: b612
GPG Key ID: 481225A74DEB62A1

@ -1,6 +1,7 @@
package starlog package starlog
import ( import (
"b612.me/starmap"
"fmt" "fmt"
"io" "io"
"math/rand" "math/rand"
@ -12,6 +13,7 @@ var Std *StarLogger
var stdmu sync.Mutex var stdmu sync.Mutex
func init() { func init() {
stacks = starmap.NewStarStack(1024)
rand.Seed(time.Now().UnixNano()) rand.Seed(time.Now().UnixNano())
stackStopChan = make(chan int) stackStopChan = make(chan int)
StartStacks() StartStacks()

@ -33,7 +33,7 @@ var (
LvPanic: "PANIC", LvPanic: "PANIC",
LvFatal: "FATAL", LvFatal: "FATAL",
} }
stacks starmap.StarStack stacks *starmap.StarStack
stackStarted bool = false stackStarted bool = false
stackStopChan chan int stackStopChan chan int
stackMu sync.Mutex stackMu sync.Mutex
@ -165,7 +165,7 @@ func StartStacks() {
} }
poped := stacks.MustPop() poped := stacks.MustPop()
if poped == nil { if poped == nil {
time.Sleep(time.Millisecond * 10) time.Sleep(time.Microsecond * 500)
continue continue
} }
val := poped.(logTransfer) val := poped.(logTransfer)

Loading…
Cancel
Save