docs: public void recordCauseOfInterruption(Run<?,?> build, TaskListener listener) {
          List<CauseOfInterruption> r;
  
          // atomically get&clear causes.
          lock.writeLock().lock();
          try {
              if (causes.isEmpty())   return;
              r = new ArrayList<>(causes);
              causes.clear();
          } finally {
              lock.writeLock().unlock();
          }
  
          build.addAction(new InterruptedBuildAction(r));
          for (CauseOfInterruption c : r)
              c.print(listener);
      }