static public int cancelOperation(int token){
  int canceled=0;
synchronized (sWorkQueue) {
    Iterator<OperationInfo> it=sWorkQueue.iterator();
    while (it.hasNext()) {
      if (it.next().token == token) {
        it.remove();
        ++canceled;
      }
    }
  }
  if (AsyncQueryService.localLOGV) {
    Log.d(TAG,"cancelOperation(" + token + ") -> "+ canceled);
  }
  return canceled;
}

static public int cancelOperation ( int token ) { int canceled = 0 ; synchronized ( sWorkQueue ) { Iterator < OperationInfo > it = sWorkQueue . iterator ( ) ; while ( it . hasNext ( ) ) { if ( it . next ( ) . token == token ) { it . remove ( ) ; ++ canceled ; } } } if ( AsyncQueryService . localLOGV ) { Log . d ( TAG , "cancelOperation(" + token + ") -> " + canceled ) ; } return canceled ; }
attempts to cancel operation that has not already started . note that there is no guarantee that the operation will be canceled . they still may result in a call to on [ query / insert / update / delete / batch ] complete after this call has completed .
