Skip to content

Commit

Permalink
fix: if the pool is saturated, execute the job in the current goroutine
Browse files Browse the repository at this point in the history
  • Loading branch information
Reasno committed Jan 5, 2022
1 parent 34efbd4 commit c582490
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{})
Expand Down

0 comments on commit c582490

Please sign in to comment.