CS2010 Assignment 4 Threaded prime number search