code: public <T> T onWhile(Supplier<T> f) {
          try(Guard g = on()) {
              return f.get();
          }
      }
docs: Runs the given computation, making sure this indicator is on.
  When done, this indicator is reset to the previous state.
  
  <pre>
  T t = indicator.onWhile(f);
  </pre>
  
  is equivalent to
  
  <pre>
  T t;
  try(Guard g = on()) {
  t = f.get();
  }
  </pre>