1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-03-01 00:35:28 +08:00

refactor: refact Or func in channel.go

This commit is contained in:
dudaodong
2022-04-21 14:13:19 +08:00
parent d1c6c57700
commit c27ccad2b9
2 changed files with 16 additions and 5 deletions

View File

@@ -125,7 +125,13 @@ func TestOr(t *testing.T) {
start := time.Now()
c := NewChannel()
<-c.Or(sig(2*time.Hour), sig(5*time.Minute), sig(1*time.Second), sig(1*time.Hour), sig(1*time.Minute))
<-c.Or(
sig(1*time.Second),
sig(2*time.Second),
sig(3*time.Second),
sig(4*time.Second),
sig(5*time.Second),
)
t.Logf("done after %v", time.Since(start))