Don't wait forever to acquire the send lock

[?]
Sep 1, 2017, 1:29 PM
UYDRSHYRPB5YLSDRY6CZWIIUQWMT3HTCPUXHTH4YHCZZCOFFWCSQC

Dependencies

  • [2] BYVRA54Q Temporarily disable machines on any exception, not just connection failures
  • [3] CNLNT3T4 Allow only 1 thread to send a closure to a given machine at the same time
  • [4] 5AIYUMTB Basic remote building
  • [5] FITVNQ2S Keep track of the time we spend copying to/from build machines
  • [6] YR2IM6Y5 Temporarily disable machines after a connection failure
  • [7] HJOEIMLR Refactor

Change contents

  • replacement in src/hydra-queue-runner/build-remote.cc at line 232
    [2.2711][2.2711:2787]()
    std::lock_guard<std::mutex> sendLock(machine->state->sendLock);
    [2.2711]
    [2.2787]
    std::unique_lock<std::timed_mutex> sendLock(
    machine->state->sendLock, std::chrono::seconds(600));
  • replacement in src/hydra-queue-runner/state.hh at line 234
    [3.286][3.286:315]()
    std::mutex sendLock;
    [3.286]
    [3.3777]
    std::timed_mutex sendLock;