• Cristian Maglie's avatar
    Fixed race condition at the edge of builds. Using queue channel. · 0785c72f
    Cristian Maglie authored
    The last loop collecting the remaining objectFiles may be run before the
    last jobs completes.
    This commit replaces the two channels used to fill objectFiles and to
    signal error with direct variable access guarded by mutex, this avoids
    race conditions at the end and streamlines the whole process.
    
    Also added a 'queue' channel to feed the goroutines, this is not strictly
    part of the fix, but helps to fairly distribute the workload.
    0785c72f
utils.go 17.2 KB