set num threads from client