FutureTask « Operation « Java Thread Q&A

Home
Java Thread Q&A
1.concurrency
2.Development
3.Exception
4.Notify
5.Operation
6.Socket
7.State
8.synchronize
9.Thread Safe
10.ThreadPool
Java Thread Q&A » Operation » FutureTask 

1. How to ensure garbage collection of a FutureTask that is submitted to a ThreadPoolExecutor and then cancelled?    stackoverflow.com

I am submitting Callable objects to a ThreadPoolExecutor and they seem to be sticking around in memory. Looking at the heap dump with the MAT tool for Eclipse see that the Callable ...

2. How to get to FutureTask execution state?    stackoverflow.com

I have a singleThreadExecutor in order to execute the tasks I submit to it in serial order i.e. one task after another, no parallel execution. I have runnable which goes something like ...

3. How do I efficiently process multiple results from an Executor Service    stackoverflow.com

I'n new to ExecutorService, but am unsure about my approach to this. I could be dealing with up to 100 threads for a known task. I'm using the general format below, where I ...

4. ExecutorService and FutureTask - Blocked Thread    coderanch.com

Hi, I have the following code: ... private static ScheduledExecutorService executor = Executors.newScheduledThreadPool(10); ... final Future future = executor.submit(new Callable() { public Boolean call() { try { return MyClass.nativeMethod(); } catch (Exception e) { // TODO Auto-generated catch block } return false; } }); ... executor.schedule(new Runnable(){ public void run(){ future.cancel(true); } }, 5000, TimeUnit.MILLISECONDS); I'm running the aforementioned code inside ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.