Multi-threading aminer and pminer