package ru.yandex.webmaster3.core.concurrency;

import org.joda.time.Duration;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException;

/**
 * @author avhaliullin
 */
public interface AsyncTask<T> {
    T join();

    T get(Duration timeout) throws InterruptedException, ExecutionException, TimeoutException;

    void cancel();
}
