Package org.japura.task.executors

Examples of org.japura.task.executors.CancelToken


  this.cancelToken = null;
  }

  private CancelToken getCancelToken() {
  if (this.cancelToken == null) {
    this.cancelToken = new CancelToken();
  }
  return this.cancelToken;
  }
View Full Code Here


  private ReentrantLock cancelLock;
  private CancelToken cancelToken;
  private Executor executor;

  public DefaultParallelExecutor() {
  this.cancelToken = new CancelToken();
  this.executor = new Executor();
  this.cancelLock = new ReentrantLock();
  }
View Full Code Here

  private CancelToken getCancelToken() {
  this.cancelLock.lock();
  try {
    if (this.cancelToken == null) {
    this.cancelToken = new CancelToken();
    }
    return this.cancelToken;
  } finally {
    this.cancelLock.unlock();
  }
View Full Code Here

  this.cancelToken = null;
  }

  private CancelToken getCancelToken() {
  if (this.cancelToken == null) {
    this.cancelToken = new CancelToken();
  }
  return this.cancelToken;
  }
View Full Code Here

  private ReentrantLock cancelLock;
  private Executor executor;
  private CancelToken cancelToken;

  public DefaultSerialExecutor() {
  this.cancelToken = new CancelToken();
  this.executor = new Executor();
  this.cancelLock = new ReentrantLock();
  }
View Full Code Here

  private CancelToken getCancelToken() {
  this.cancelLock.lock();
  try {
    if (this.cancelToken == null) {
    this.cancelToken = new CancelToken();
    }
    return this.cancelToken;
  } finally {
    this.cancelLock.unlock();
  }
View Full Code Here

TOP

Related Classes of org.japura.task.executors.CancelToken

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.