Skip to content

Commit 21451f9

Browse files
committed
fix: remove unnecessary context initialization in NewStateful
The ctx field was being set to context.Background() in NewStateful but not in New, creating an asymmetry. Since Go() overwrites this field anyway, the initialization was redundant.
1 parent 94d84b6 commit 21451f9

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

pool.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ func NewStateful[T any](size int, maker func() Worker[T]) *WorkerGroup[T] {
111111
workerMaker: maker,
112112
workerChanSize: 1,
113113
batchSize: 10, // default batch size
114-
ctx: context.Background(),
115114

116115
// initialize channels
117116
workersCh: make([]chan T, size),

0 commit comments

Comments
 (0)