Probleme mit Deadlocks durch Timeout im Ctx verhindern.

This commit is contained in:
Marco Kittel 2025-06-29 11:11:58 +02:00
parent 6f75f05e06
commit 8b052bc038
1 changed files with 1 additions and 6 deletions

View File

@ -89,11 +89,6 @@ func (f *ElioDateiFoo) ScanCsv(ctx context.Context, data chan<- CountryCsvData)
f.mu.Lock()
f.haveDone[v.filename] = time.Now()
f.mu.Unlock()
go func() {
//Max 5 Sekunden zum Abarbeiten eines Datensatzes
tctx, cancel := context.WithTimeout(ctx, time.Second*5)
f.process(tctx, v.filename, data)
cancel()
}()
f.process(ctx, v.filename, data)
}
}