チェンジセット 632
- コミット日時:
- 2008/06/14 02:39:04 (4 年前)
- ファイル:
-
- as3/Thread/branches/soumen/Thread.as3proj (更新) (1 diff)
- as3/Thread/branches/soumen/src/org/libspark/thread/Thread.as (更新) (3 diffs)
- as3/Thread/branches/soumen/src/org/libspark/thread/errors/ThreadLibraryNotInitializedError.as (追加)
- as3/Thread/branches/soumen/tests/org/libspark/thread/ThreadExecutionTest.as (更新) (2 diffs)
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
as3/Thread/branches/soumen/Thread.as3proj
r628 r632 69 69 <!-- Class files to compile (other referenced classes will automatically be included) --> 70 70 <compileTargets> 71 <compile path=" samples\00.hello\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
r631 r632 37 37 import org.libspark.thread.errors.IllegalThreadStateError; 38 38 import org.libspark.thread.errors.InterruptedError; 39 import org.libspark.thread.errors.ThreadLibraryNotInitializedError; 39 40 40 41 /** … … 563 564 * スローされます。</p> 564 565 * 566 * <p>スレッドライブラリが初期化されていない状態の場合 (isReady が false の場合) は ThreadLibraryNotInitializedError が 567 * スローされます。</p> 568 * 565 569 * <p>あるスレッドの実行中にこのメソッドが呼び出された場合、そのスレッドはこのメソッドが呼び出されたスレッドの親スレッドとなり、 566 570 * このメソッドが呼び出されたスレッドは子スレッドとなります。</p> … … 571 575 * 572 576 * @throws org.libspark.thread.errors.IllegalThreadStateError スレッドが既に開始されている場合 577 * @throws org.libspark.thread.errors.ThreadLibraryNotInitializedError スレッドライブラリが初期化されていない場合 573 578 */ 574 579 public function start():void 575 580 { 581 // 初期化されていなければエラー 582 if (!isReady) { 583 throw new ThreadLibraryNotInitializedError('Thread Library is not initialized. Please call Thread#initialize before.'); 584 } 585 576 586 // 既に実行されていたらエラー 577 587 if (_state != ThreadState.NEW) { as3/Thread/branches/soumen/tests/org/libspark/thread/ThreadExecutionTest.as
r515 r632 8 8 import org.libspark.as3unit.test_expected; 9 9 import org.libspark.thread.errors.IllegalThreadStateError; 10 import org.libspark.thread.errors.ThreadLibraryNotInitializedError; 10 11 11 12 use namespace before; … … 60 61 var t:Thread = new Thread(); 61 62 t.start(); 63 t.start(); 64 } 65 66 /** 67 * スレッドライブラリが初期化されていない状態で start したら ThreadLibraryNotInitializedError がスローされるか。 68 */ 69 test_expected static const initializeError:Class = ThreadLibraryNotInitializedError; 70 test function initializeError():void 71 { 72 Thread.initialize(null); 73 74 var t:Thread = new Thread(); 62 75 t.start(); 63 76 }

