mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-29 03:30:24 +08:00
优化系统goroutine使用,减少goroutine数量,增加goman查看goroutine数量指令
This commit is contained in:
21
internal/goman/lib_test.go
Normal file
21
internal/goman/lib_test.go
Normal file
@@ -0,0 +1,21 @@
|
||||
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
||||
|
||||
package goman
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestNew(t *testing.T) {
|
||||
New(func() {
|
||||
t.Log("Hello")
|
||||
|
||||
t.Log(List())
|
||||
})
|
||||
|
||||
time.Sleep(1 * time.Second)
|
||||
t.Log(List())
|
||||
|
||||
time.Sleep(1 * time.Second)
|
||||
}
|
||||
Reference in New Issue
Block a user