private void findPrimes () {
        myPrimes = new ArrayList<Integer> ();
        
        // Create many threads
        Thread[] threads = new Thread[myNumThreads];
        for (int i=0; i<myNumThreads; i++) {
            threads[i] = new Thread () {
                @Override
                public void run() {
                    while (!myInputs.isEmpty()) {
                        Integer input;
                        synchronized(myInputs) {
                            input = myInputs.poll();
                        }
                        if (input == null) {
                            return;
                        }
                        if (SimplePrime.checkPrime (input)) {
                            synchronized(myPrimes) {
                                myPrimes.add(input);
                            }
                        }
                    }
                    
                }
            };
        }
        
        for (int i=0; i<myNumThreads; i++) {
            threads[i].start();
        }
        try {
            for (int i=0; i<myNumThreads; i++) {
                threads[i].join();
            }
        } catch (InterruptedException e) {
            System.out.println("interrupt caught");
        }
    }