由于大量的计算应用程序挂起,如何摆脱这个问题? [英] Application hangs beacause of large number of computations, how to get rid of this problem?

查看:46
本文介绍了由于大量的计算应用程序挂起,如何摆脱这个问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的程序首先找到给定输入的排列,然后对每个通过排列获得的结果进行一些计算.对于较小的输入,它可以正常工作,但对于超过6个字符的输入,它会挂起.我知道6的运算!字符串需要时间,但是为什么要挂?

My program first find permutation of the given input and then performs some computation on each result get by permutation. it works fine for smaller inputs but for the input more than 6 characters, it hangs. i know computation on 6! strings takes time but why hang?

推荐答案



如果您的代码花费更多时间,则需要使用线程进行此计算.

请检查此链接

谢谢
-Amit
Hi,

if your code is taking more time then you need to use threading for this computation.

please check this link

thanks
-Amit


这篇关于由于大量的计算应用程序挂起,如何摆脱这个问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆