Все вопросы: [futuretask]
5 вопросов
How do I get FutureTask to return after TimeoutException?
In the code below, I'm catching a TimeoutException after 100 seconds as intended. At this point I would expect the code to exit from main and the program to terminate but it keeps printing to the console. How do I get the task to stop executing after timeout? private static final ExecutorServic...
Java 5: java.util.concurrent.FutureTask - Semantics of cancel() and done()
I am currently hunting a nasty bug in a multi-threaded environment using FutureTasks and Executors. The basic idea is this to have a fixed number of threads execute individual FutureTasks that compute a result that is to be displayed in a a table (never mind the GUI aspect here). I have been lo...
Seeking Clarity on Java ScheduledExecutorService and FutureTask
I'm just starting to look into Futures and the ScheduledExecutorService in Java, and I'm wondering why my Callable isn't running on the schedule I've indicated. In this sample code, the callable runs once, but the app never completes, nor does the task run again, which is what I expected to happe...
Можете ли вы использовать объекты Future / Futuretask с Spring TaskExecutors?
Можно ли использовать Java FutureTask с помощью Spring TaskExecutor, чтобы получить Будущее ? Я ищу TaskExecutor, который реализует Java ExecutorService , в частности метод submit (). Просматривая Spring Javadocs не содержит подобных классов. Есть ли какой-нибудь альтернативный метод об...
Это хороший способ использовать java.util.concurrent.FutureTask?
Прежде всего, я должен сказать, что я новичок в API java.util.concurrent, поэтому, возможно, то, что я делаю, совершенно неправильно. Что я хочу делать? У меня есть приложение Java, которое в основном выполняет две отдельные обработки (называемые myFirstProcess , mySecondProcess ), но эт...