Skip to content

Commit

Permalink
Update async test
Browse files Browse the repository at this point in the history
  • Loading branch information
ngallagher committed Jan 20, 2019
1 parent 2ee6239 commit b0e0c3c
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ public <T> Promise<T> schedule(Callable<T> task) {
private static class PromiseFuture<T> implements Promise<T> {

private final PromiseDispatcher<T> dispatcher;
private final PromiseExecutor<T> executor;
private final FutureTask<T> future;
private final PromiseTask<T> task;

public PromiseFuture(Callable<T> task) {
this.dispatcher = new PromiseDispatcher<T>();
this.task = new PromiseTask<T>(dispatcher, task);
this.future = new FutureTask<T>(task);
this.executor = new PromiseExecutor<T>(dispatcher, task);
this.future = new FutureTask<T>(executor);
}

@Override
Expand Down Expand Up @@ -169,12 +169,12 @@ public void exception(Throwable cause) {
}
}

private static class PromiseTask<T> implements Callable<T> {
private static class PromiseExecutor<T> implements Callable<T> {

private final PromiseDispatcher<T> dispatcher;
private final Callable<T> task;

public PromiseTask(PromiseDispatcher<T> dispatcher, Callable<T> task) {
public PromiseExecutor(PromiseDispatcher<T> dispatcher, Callable<T> task) {
this.dispatcher = dispatcher;
this.task = task;
}
Expand Down

0 comments on commit b0e0c3c

Please sign in to comment.