@Override
	public void run() {
		long number = 1L;
		while (true) {
			if (isPrime(number)) {
				System.out.printf("Number: %d is a prime.\n", number);
			}
			// check out if the thread is interrupted
			if (isInterrupted()) {
				System.out.println("The prime generator thread is interrupted!");
				return;
			}
			number++;
		}
	}