executorservice « ThreadPool « 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 » ThreadPool » executorservice 

1. What is an elegant way for calling a custom close-method on each worker-thread in a Java threadpool?    stackoverflow.com

say I'm using a

ExecutorService ex = Executors.newFixedThreadPool(nrofthreads);
spinning up some work and waiting when it's done. However I have same Threadlocal objects in the worker-threads which need to be closed when ...

2. 500 Worker Threads, what kind of thread pool?    stackoverflow.com

I am wondering if this is the best way to do this. I have about 500 threads that run indefinitely, but Thread.sleep for a minute when done one cycle of processing.

 ...

3. Some questions about Threading in Java    stackoverflow.com

First a little background. I got a warning in NetBeans told me not to start a new thread in a constructor. I have read that the reason for that ...

4. Time limit on individual threads with ExecutorService    stackoverflow.com

I have an ExecutorService managing a number of Callables. The tasks that the Callables run are mostly black box transformations and number crunching. Under certain conditions, the data being transformed will ...

5. Naming threads and thread-pools of ExecutorService    stackoverflow.com

Let's say I have an application that utilizes the Executor framework as such

Executors.newSingleThreadExecutor().submit(new Runnable(){
    @Override
    public void run(){
        ...

6. Propagating ThreadLocal to a new Thread fetched from a ExecutorService    stackoverflow.com

I'm running a process in a separate thread with a timeout, using an ExecutorService and a Future (example code here) (the thread "spawning" takes place in a AOP Aspect). Now, the ...

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.