CancellationTokenRegistration register(Runnable action) {
    CancellationTokenRegistration ctr;
    synchronized (lock) {
      throwIfClosed();

      ctr = new CancellationTokenRegistration(this, action);
      if (cancellationRequested) {
        ctr.runAction();
      } else {
        registrations.add(ctr);
      }
    }
    return ctr;
  }
CancellationTokenRegistration register ( Runnable action ) { CancellationTokenRegistration ctr ; synchronized ( lock ) { throwIfClosed ( ) ; ctr = new CancellationTokenRegistration ( this , action ) ; if ( cancellationRequested ) { ctr . runAction ( ) ; } else { registrations . add ( ctr ) ; } } return ctr ; }
/* package