From c582490912b15a7d39eaece183f659cecea18f0c Mon Sep 17 00:00:00 2001 From: Reasno Date: Wed, 5 Jan 2022 18:20:25 +0800 Subject: [PATCH] fix: if the pool is saturated, execute the job in the current goroutine --- pool_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pool_test.go b/pool_test.go index a07f08a..bfb27ce 100644 --- a/pool_test.go +++ b/pool_test.go @@ -47,7 +47,7 @@ func TestPool_FallbackToSyncMode(t *testing.T) { defer cancel() dispatcher := events.SyncDispatcher{} - p := newPool(WithTimeout(time.Second), WithConcurrency(1), WithShutdownEvents())(&dispatcher) + p := NewPool(WithTimeout(time.Second), WithConcurrency(1), WithShutdownEvents())(&dispatcher) p.Run(ctx) var executed = make(chan struct{})