d69bf45 Payload should wait for all storage related threads to finish

Authored and Committed by m4rtink 2 years ago
    Payload should wait for all storage related threads to finish
    
    Otherwise a race condition can happen when some of the storage related
    threads run at the same time as the payload thread and both interact
    with the Blivet storage instance.
    
    This storage instance is not thread safe and two threads interacting
    with it at the same time can result in a deadlock.
    
    By waiting for all storage related threads to finish before running
    the payload thread we can avoid this race condition and the resulting
    deadlock.
    
    Thanks a lot to Honza Stodola and Vendula Poncova for helping me track
    down this kinda tricky race condition! :)
    
    Resolves: rhbz#2002203