there are so many factors which would ultimately factor in to whether or not a given system could support a certain number of threads. that said, i would try to correlate how your app performs for X number of threads per cpu in the system. Once you have determined a reasonable value for X, you can get the system cpu count for the current system and multiply by X to determine the number of threads to use.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…