修复缓存
Build docker and publish / build (20.15.1) (push) Successful in 7m26s

This commit is contained in:
2026-03-06 21:58:29 -08:00
parent 19932bb9f7
commit 4d913c1728
175 changed files with 437 additions and 12104 deletions
-45
View File
@@ -1,45 +0,0 @@
package threading
import (
"io"
"log"
"sync"
"sync/atomic"
"testing"
"github.com/stretchr/testify/assert"
)
func TestRoutineGroupRun(t *testing.T) {
var count int32
group := NewRoutineGroup()
for i := 0; i < 3; i++ {
group.Run(func() {
atomic.AddInt32(&count, 1)
})
}
group.Wait()
assert.Equal(t, int32(3), count)
}
func TestRoutingGroupRunSafe(t *testing.T) {
log.SetOutput(io.Discard)
var count int32
group := NewRoutineGroup()
var once sync.Once
for i := 0; i < 3; i++ {
group.RunSafe(func() {
once.Do(func() {
panic("")
})
atomic.AddInt32(&count, 1)
})
}
group.Wait()
assert.Equal(t, int32(2), count)
}
-11
View File
@@ -1,11 +0,0 @@
package threading
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestRoutineId(t *testing.T) {
assert.True(t, RoutineId() > 0)
}