Skip to content
  • David Vorick's avatar
    4bf97d4d
    fix deadlock error in modules/host/update.go · 4bf97d4d
    David Vorick authored
    In the original code, the host would unlock before calling 'wg.Wait()'
    to wait for all of the host threads to unlock. This ended up being
    insufficient, because the termination of ProcessConsensusChange was
    still blocked.
    
    Now, the waiting happens in a separate goroutine so that
    ProcessConsensusChange is not blocked while the host action item
    handlers are potentially waiting for network calls with renters to
    finish. This means that the consensus set will no longer be blocked.
    4bf97d4d
    fix deadlock error in modules/host/update.go
    David Vorick authored
    In the original code, the host would unlock before calling 'wg.Wait()'
    to wait for all of the host threads to unlock. This ended up being
    insufficient, because the termination of ProcessConsensusChange was
    still blocked.
    
    Now, the waiting happens in a separate goroutine so that
    ProcessConsensusChange is not blocked while the host action item
    handlers are potentially waiting for network calls with renters to
    finish. This means that the consensus set will no longer be blocked.
Loading