在Class B中可以增加一个Public布尔变量
public bool m_bStop=false; while (true and not m_bStop )
{
udpC.receive(); <----------------循环的存在导致线程的挂起
...
udpC.send;
}在Class A 中停止线程时设m_bStop=true
在调用abort时用try catch应该就可以了。
public bool m_bStop=false; while (true and not m_bStop )
{
udpC.receive(); <----------------循环的存在导致线程的挂起
...
udpC.send;
}在Class A 中停止线程时设m_bStop=true
在调用abort时用try catch应该就可以了。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货