DatabaseException exception;
public AsyncTask(ReadGraphImpl graph) {
+ this(graph, 1);
+ }
+
+ public AsyncTask(ReadGraphImpl graph, int pos) {
super(graph);
+ this.position = pos;
+ if(this.position < 1024)
+ this.position *= 2;
}
@Override
}
throw new IllegalStateException("Eternal loop in queries.");
}
- graph.processor.schedule(new AsyncTask(graph));
+ graph.processor.scheduleLater(new AsyncTask(graph, position));
}
}
+ @Override
+ public boolean maybeReady() {
+ return proc.isDone();
+ }
+
}
try {
if(needsToBlock) task.run(0);
else if (proc.isDone()) task.run(0);
else {
- graph.processor.schedule(task);
+ graph.processor.scheduleLater(task);
return null;
}