Exits job once first thread finds solution.