refactor: refact Or func in channel.go

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

No files matched your search

+7 -1
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))