チェンジセット 578
- コミット日時:
- 2008/06/06 17:12:04 (6 ヶ月前)
- ファイル:
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
as3/Thread/branches/soumen/Thread.as3proj
r577 r578 69 69 <!-- Class files to compile (other referenced classes will automatically be included) --> 70 70 <compileTargets> 71 <compile path=" samples\autoShowHide\Sample.as" />71 <compile path="tests\RunTests.as" /> 72 72 </compileTargets> 73 73 <!-- Paths to exclude from the Project Explorer tree --> as3/Thread/branches/soumen/src/org/libspark/thread/Thread.as
r572 r578 757 757 // エラーハンドラをリセット 758 758 resetErrorHandlers(); 759 // 割り込みハンドラをリセット 760 _interruptedHandler = null; 759 761 760 762 // エラーハンドラが実行されようとしている場合、実行終了後に復帰できるように保存しておいた実行関数を設定 as3/Thread/branches/soumen/tests/org/libspark/thread/InterruptionTest.as
r527 r578 91 91 assertEquals('run interrupt interrupted finalize ', Static.log); 92 92 assertFalse(i.flag); 93 }, 1000)); 94 95 t.start(); 96 } 97 98 /** 99 * 割り込みハンドラが実行のたびにリセットされているかどうか 100 */ 101 test function clearInterruptedHandler():void 102 { 103 Static.log = ''; 104 105 var t:TesterThread = new TesterThread(new ClearInterruptedHandlerTestThread()); 106 107 t.addEventListener(Event.COMPLETE, async(function(e:Event):void 108 { 109 assertEquals('run interrupt runInterrupted interrupt runInterrupted2 finalize ', Static.log); 93 110 }, 1000)); 94 111 … … 232 249 } 233 250 } 251 252 class ClearInterruptedHandlerTestThread extends Thread 253 { 254 override protected function run():void 255 { 256 Static.log += 'run '; 257 258 interrupted(runInterrupted); 259 wait(); 260 261 setTimeout(doInterrupt, 10); 262 } 263 264 private function doInterrupt():void 265 { 266 Static.log += 'interrupt '; 267 268 interrupt(); 269 } 270 271 private function runInterrupted():void 272 { 273 Static.log += 'runInterrupted '; 274 275 error(InterruptedError, runInterrupted2); 276 wait(); 277 278 setTimeout(doInterrupt, 10); 279 } 280 281 private function runInterrupted2(e:Error, t:Thread):void 282 { 283 Static.log += 'runInterrupted2 '; 284 } 285 286 override protected function finalize():void 287 { 288 Static.log += 'finalize '; 289 } 290 }
