Wisdo のメッセージ:
> Hi ALL,
>
[quoted text clipped - 32 lines]
> Thanks
> -Wisdo
Your code is wrong in a few places.
Show your real usage. Post a small demo code that is generally
compilable, runnable and could reproduce your problem. See:
http://homepage1.nifty.com/algafield/sscce.html and
[url=http://riters.com/JINX/index.cgi/Suggestions_20for_20Asking_20Questions_20on_20N
ewsgroups]this
wiki.[/url]
Wisdo - 21 Aug 2006 05:10 GMT
hiwa 写道:
> Wisdo のメッセージ:
>
[quoted text clipped - 40 lines]
> [url=http://riters.com/JINX/index.cgi/Suggestions_20for_20Asking_20Questions_20on_20N
ewsgroups]this
> wiki.[/url]
thanks for the inform.
the new code, is any synchronzied suggestion?
package test.misc;
public class Listener implements Runnable {
private Thread th;
public void initilize() {
th = new Thread(this);
th.setName(getClass().getName());
th.setDaemon(true);
th.start();
}
public void run() {
while(true) System.out.println("get event, processing....");
}
public void destroy() {
th.stop();
}
public static void main(String args[]) throws InterruptedException {
Listener lst = new Listener();
lst.initilize();
Thread.sleep(10000);
lst.destroy();
}
}
Regards
-Wisdo