I must be missing something about ThreadPoolExecutor and/or ArrayBlockingQueue. Running the code below I get the following result:
starting up testThreadPool2$1@de6ced run() : 7 run() : 7
I am not understanding why it seems to run twice, could anybody shed some light on this for me?
import java.util.concurrent.*;
public class testThreadPool { public static void main( String [] args ) { ArrayBlockingQueue<Runnable> workQueue = new ArrayBlockingQueue<Runnable>( 20 );