线程stop的时候,显示The method stop() is deprecated会有什么后果?
如下代码所示,在用stop结束线程时,stop被横线划掉了。而且报这个警告The method stop() from the type Thread is deprecated。会对线程的执行有影响吗?
tran_input = new Thread(new ActTranIn()); tran_input.start(); /**执行SSLSocket接受数据的代码。。。省略**/ tran_input.stop(); class ActTranIn implements Runnable { public void run() { /**执行SSLSocket发送数据的代码。。。省略**/ } }