2013年(92)
分类: 信息化
2013-02-22 11:19:03
[代码] [Java]代码 package demo; import java.io.IOException; import java.io.Writer; import agod.hurley.stuhome.DongTang; public class myTast implements Runnable { private static int i=0; priv ; ate static boolean isrun = false; private Writer out; public myTast(Writer out) { this.out = out; } @Override public void run() { if(isrun){ return; } isrun = true; while(true){ DongTang dd = new DongTang(); dd.send(out); i ; try { out.write(i); } catch (IOException e1) { } try{ Thread.sleep(60000); } catch(Exception e){ e.printStackTrace(); } finally { isrun = false; } } } public int getTimes(){ return i; } public boolean isRun(){ return isrun; } } ;