@Override
    public void run() {
        int[] primes = new int[MAX_PRIMES];
        int count = 0;
        
        for(int i=2; count<MAX_PRIMES;i++){
            if(finished){
                break;
            }
            
            boolean prime = true;
            
            for(int j=0; j<count;j++){
                if(i % primes[j] == 0){
                    prime = false;
                    break;
                }
            }
            if(prime){
                primes[count++] = i;
                System.out.println("Found prime: " + i);
            }
        }
    }