From 79805d1fdc4085cd76add323d7111390034507e6 Mon Sep 17 00:00:00 2001 From: milarin Date: Mon, 19 Dec 2022 18:03:43 +0100 Subject: [PATCH] FindFirstAndFlush flushes source concurrently --- find.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/find.go b/find.go index 8cbd3d8..fea56ef 100644 --- a/find.go +++ b/find.go @@ -9,7 +9,7 @@ func FindFirst[T any](source <-chan T) *T { func FindFirstAndFlush[T any](source <-chan T) *T { for v := range source { - Flush(source) + go Flush(source) return &v } return nil