public static void main(String args[])
    {
        ExecutorService exec = Executors.newCachedThreadPool();
        //PriorityBlockingQueue<Runnable> queue = new PriorityBlockingQueue<Runnable>();
        PriorityBlockingQueue<Runnable> queue = new PriorityBlockingQueue<Runnable>();
        exec.execute(new PrioritizedTaskProducer(queue, exec));
        try {
            TimeUnit.MILLISECONDS.sleep(250);
        } catch (InterruptedException e) {
        }
        exec.execute(new PrioritizedTaskConsumer(queue));
    }