void writeIntentLock() {
    checkWriteThreadAccess();
    checkReadIsNotHeld("Write Intent");

    for (int iter=0; ;iter++) {
      if (writeIntent.compareAndSet(false, true)) {
        assertInitialWriteState();

        break;
      }

      if (iter > SPIN_TO_WAIT_FOR_LOCK) {
        LockSupport.parkNanos(this, 1_000_000);  // unparked by writeIntentUnlock
      }
      else {
        Thread.yield();
      }
    }
  }
void writeIntentLock()