blob: e09f950af6b1350d90c7c50e53412b38b45dda2f [file] [log] [blame]
import java.util.Stack;
public class AsynchronousImageLoader extends Thread {
private final Stack _tasks = new Stack();
private void threadBody() throws InterruptedException {
while (true) {
final Runnable task;
synchronized (this) {
while (_tasks.isEmpty())
wait();
task = (Runnable) _tasks.pop();
}
task.run();
}
}
}