|
下面是例子
import lrapi.lr;
class test1 extends Thread{
public void run(){
for(int a=0;a<50;a++)
System.out.println("a="+a);
}
}
class test2 extends Thread{
public void run(){
for(int i=50;i>0;i--)
System.out.println("i="+i);
}
}
public class Actions
{
public int init() throws Throwable {
return 0;
}//end of init
public int action() throws Throwable {
test1 t1=new test1();
test2 t2=new test2();
t1.start();
t2.start();
// t1.run();
// t2.run();
return 0;
}//end of action
public int end() throws Throwable {
return 0;
}//end of end
}
为什么执行后没有打印出内容?直接就运行完了.看log里面报错 Error (-17998): Failed to get [param not passed in call] thread TLS entry 不明白是什么意思.
代码在别的环境下 比如Eclipse 能正常执行并打印出结果?? |
|