Код: Выделить всё
private static ExecutorService executorService
= Executors.newFixedThreadPool(1);
public void update(MyObject obj) {
executorService.execute(new FutureTask(new MyFutureTask(obj)));
}
Подробнее здесь: https://stackoverflow.com/questions/178 ... n-java-1-6