Small change so that we can detect the thread is attempting to be interrupted, so that these workers wont continue to run after a non-prime result has been found.