Two methods of using multi-threading to find prime numbers