'action'에 해당되는 글 1건

  1. 2007.11.22 [sample] Action안에 thread 생성하기

Action안에서 thread만드는게 뭐 별거인가 싶지만 생서에 있어서 주의사항은
final 이라는점이다.
 

private void importProcess(final int  data) {
try {
 final Thread t = new Thread(new Runnable() {
  public void run() {
   try {
    threadExecute(data);
   } catch (Exception e) {
   }
  }
 });
 t.setName(threadName);
 t.setPriority(threadPriority);
 t.start();
} catch (Exception e) {}
}

private void threadExecute(int  data) throws Exception {
..
}

1 

글 보관함

카운터

Total : / Today : / Yesterday :
get rsstistory!