Skip to content

Commit

Permalink
Merge pull request #168 from vasi/parallel2
Browse files Browse the repository at this point in the history
Make chan buffered for better performance
  • Loading branch information
SaveTheRbtz authored Oct 1, 2024
2 parents 0e32fcc + 2585dff commit df49df4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func (s *writerImpl) writeManyProducer(ctx context.Context, frameSource FrameSou
// Put a channel on the queue as a sort of promise.
// This is a nice trick to keep our results ordered, even when compression
// completes out-of-order.
ch := make(chan encodeResult)
ch := make(chan encodeResult, 1)
select {
case <-ctx.Done():
return nil
Expand Down

0 comments on commit df49df4

Please sign in to comment.