- 788 名前:デフォルトの名無しさん mailto:sage [2009/12/23(水) 23:20:55 ]
- いくつかの重い処理をするにあたって、割り込みするコードについて質問です。
現在では、Threadのrunメソッドで、 try{ 重い処理1 if(interrupted())throw new InterruptedException(); 重い処理2 if(interrupted())throw new InterruptedException(); 重い処理3 } catch (InterruptedException e){ } という感じにしているんですが、結局ジャンプ処理なので汚いコードだと感じています。 こういう場合にはどうするべきでしょうか? よろしくお願いします。
|

|