feat: enhance concurrency management by adding WaitGroup support in extractors and loaders

This commit is contained in:
2026-04-09 00:22:30 -05:00
parent dc632361e5
commit 51480015ba
8 changed files with 82 additions and 68 deletions

View File

@@ -3,6 +3,7 @@ package main
import (
"context"
"fmt"
"sync"
)
type LoaderError struct {
@@ -19,6 +20,7 @@ func loaderErrorHandler(
chErrorsIn <-chan LoaderError,
chChunksOut chan<- Chunk,
chJobErrorsOut chan<- JobError,
wgActiveChunks *sync.WaitGroup,
) {
for {
if ctx.Err() != nil {
@@ -46,6 +48,8 @@ func loaderErrorHandler(
case <-ctx.Done():
return
}
wgActiveChunks.Done()
continue
}