Мой код:
ScheduledServiceExecutor service = Executors.newSingleThreadScheduledExecutor();
ScheduledFuture future = service.scheduleWithFixedDelay(
runnable, 1, 1, TimeUnit.MILLISECONDS
);
// ...
// now it time to shut it all down
future.cancel(true);
service.shutdown();
Я здесь? Может быть, я должен сделать:
service.shutdown();
future.cancel(true);
Как вы думаете?