摘要
首先分析了Windows消息响应不确定性的原因和多线程机制,并在此基础上针对多线程自动测试软件中出现的多线程安全问题-不能停止和安全退出,设计了一个工作线程超类,工作线程通过继承该超类可以确保主线程退出前子线程能得到完全退出的解决方法。在某型鱼雷测试系统中的应用表明,该方法可以可靠保证多线程应用程序的紧急停止和安全退出。
Firstly,the reason of Windows message response uncertainty and multi thread mechanism are analyzed in this paper,and then a worker thread superelass is designed for the multi-thread security problem, can't stop and safely exit, which appears in automated test system software. To through worker thread inherit the superelass,it provides a solution that the child thread can exit completely before the main thread exits. The results which applyed in a type of torpedo test system indicate that this method can ensure reliably that the multi-threaded applications stop urgently and exit safely.
出处
《国外电子测量技术》
2012年第6期40-42,共3页
Foreign Electronic Measurement Technology