スレッド内のyield()メソッドの奇妙な問題


今日はyieldの方法についての小さな例のテストをしました.
1つのスレッドを50回ループし、変数iでタグ付けし、現在のループを何回目(出力i)に出力するたびに、
iが10の数である場合にyieldメソッドを呼び出す(if(0==i%10))
こんな小さな例では問題ないと思っていたのに、結局...
以下にソースコードと4回のテスト結果を貼り付けます
ソース:
public class TestYield {

	public static void main(String[] args) {
		Thread4 t1 = new Thread4("1");
		Thread4 t2 = new Thread4("2");
		t1.start();
		t2.start();
	}
}

class Thread4 extends Thread {
	public Thread4(String name) {
		super(name);
	}
	public void run() {
		for(int i=1; i<=50; i++) {
			System.out.println("thread "+getName()+":"+i);
			if(0 == i%10) {
				yield();
			}
		}
	}
}

結果1:
thread 1:1
thread 1:2
thread 1:3
thread 1:4
thread 1:5
thread 1:6
thread 1:7
thread 1:8
thread 1:9
thread 1:10
thread 2:1
thread 2:2
thread 2:3
thread 2:4
thread 2:5
thread 2:6
thread 2:7
thread 2:8
thread 2:9
thread 2:10
thread 1:11
thread 1:12
thread 2:11
thread 2:12
thread 2:13
thread 2:14
thread 2:15
thread 2:16
thread 2:17
thread 1:13
thread 1:14
thread 1:15
thread 1:16
thread 1:17
thread 1:18
thread 1:19
thread 1:20
thread 2:18
thread 2:19
thread 2:20// 
thread 2:21
thread 2:22
thread 2:23
thread 2:24
thread 2:25
thread 2:26
thread 2:27
thread 2:28
thread 2:29
thread 2:30// 
thread 2:31
thread 2:32
thread 1:21
thread 1:22
thread 1:23
thread 1:24
thread 1:25
thread 1:26
thread 1:27
thread 1:28
thread 1:29
thread 1:30// 
thread 1:31
thread 1:32
thread 1:33
thread 1:34
thread 1:35
thread 1:36
thread 1:37
thread 1:38
thread 1:39
thread 1:40
thread 2:33
thread 2:34
thread 2:35
thread 2:36
thread 2:37
thread 2:38
thread 2:39
thread 2:40
thread 1:41
thread 1:42
thread 1:43
thread 2:41
thread 2:42
thread 2:43
thread 2:44
thread 2:45
thread 2:46
thread 2:47
thread 2:48
thread 2:49
thread 2:50
thread 1:44
thread 1:45
thread 1:46
thread 1:47
thread 1:48
thread 1:49
thread 1:50
結果2:
thread 1:1
thread 1:2
thread 1:3
thread 1:4
thread 2:1
thread 2:2
thread 2:3
thread 2:4
thread 2:5
thread 2:6
thread 2:7
thread 2:8
thread 2:9
thread 2:10
thread 1:5
thread 1:6
thread 1:7
thread 1:8
thread 1:9
thread 1:10
thread 2:11
thread 2:12
thread 2:13
thread 2:14
thread 2:15
thread 2:16
thread 2:17
thread 2:18
thread 2:19
thread 2:20// 
thread 2:21
thread 2:22
thread 2:23
thread 2:24
thread 2:25
thread 2:26
thread 2:27
thread 2:28
thread 2:29
thread 2:30// 
thread 2:31
thread 2:32
thread 2:33
thread 2:34
thread 2:35
thread 2:36
thread 2:37
thread 2:38
thread 2:39
thread 2:40// 
thread 2:41
thread 2:42
thread 2:43
thread 2:44
thread 2:45
thread 2:46
thread 2:47
thread 2:48
thread 2:49
thread 2:50
thread 1:11
thread 1:12
thread 1:13
thread 1:14
thread 1:15
thread 1:16
thread 1:17
thread 1:18
thread 1:19
thread 1:20
thread 1:21
thread 1:22
thread 1:23
thread 1:24
thread 1:25
thread 1:26
thread 1:27
thread 1:28
thread 1:29
thread 1:30
thread 1:31
thread 1:32
thread 1:33
thread 1:34
thread 1:35
thread 1:36
thread 1:37
thread 1:38
thread 1:39
thread 1:40
thread 1:41
thread 1:42
thread 1:43
thread 1:44
thread 1:45
thread 1:46
thread 1:47
thread 1:48
thread 1:49
thread 1:50

結果3:
thread 1:1
thread 1:2
thread 1:3
thread 1:4
thread 1:5
thread 1:6
thread 1:7
thread 1:8
thread 1:9
thread 1:10// 
thread 1:11
thread 1:12
thread 1:13
thread 1:14
thread 1:15
thread 1:16
thread 1:17
thread 1:18
thread 1:19
thread 1:20// 
thread 1:21
thread 1:22
thread 1:23
thread 1:24
thread 1:25
thread 1:26
thread 1:27
thread 1:28
thread 1:29
thread 1:30// 
thread 1:31
thread 2:1
thread 2:2
thread 2:3
thread 2:4
thread 2:5
thread 2:6
thread 2:7
thread 2:8
thread 2:9
thread 2:10
thread 1:32
thread 1:33
thread 1:34
thread 1:35
thread 1:36
thread 1:37
thread 1:38
thread 1:39
thread 1:40
thread 2:11
thread 2:12
thread 2:13
thread 2:14
thread 2:15
thread 2:16
thread 2:17
thread 2:18
thread 2:19
thread 2:20
thread 1:41
thread 1:42
thread 1:43
thread 1:44
thread 1:45
thread 1:46
thread 1:47
thread 1:48
thread 1:49
thread 1:50
thread 2:21
thread 2:22
thread 2:23
thread 2:24
thread 2:25
thread 2:26
thread 2:27
thread 2:28
thread 2:29
thread 2:30
thread 2:31
thread 2:32
thread 2:33
thread 2:34
thread 2:35
thread 2:36
thread 2:37
thread 2:38
thread 2:39
thread 2:40
thread 2:41
thread 2:42
thread 2:43
thread 2:44
thread 2:45
thread 2:46
thread 2:47
thread 2:48
thread 2:49
thread 2:50

結果4:
thread 1:1
thread 1:2
thread 1:3
thread 1:4
thread 1:5
thread 1:6
thread 1:7
thread 2:1
thread 2:2
thread 2:3
thread 2:4
thread 2:5
thread 2:6
thread 2:7
thread 2:8
thread 2:9
thread 2:10
thread 1:8
thread 1:9
thread 1:10
thread 2:11
thread 2:12
thread 2:13
thread 2:14
thread 2:15
thread 2:16
thread 2:17
thread 2:18
thread 2:19
thread 2:20// 
thread 2:21
thread 2:22
thread 2:23
thread 2:24
thread 2:25
thread 2:26
thread 2:27
thread 1:11
thread 2:28
thread 2:29
thread 2:30
thread 1:12
thread 1:13
thread 1:14
thread 1:15
thread 1:16
thread 1:17
thread 1:18
thread 1:19
thread 1:20
thread 2:31
thread 2:32
thread 2:33
thread 2:34
thread 2:35
thread 2:36
thread 2:37
thread 2:38
thread 2:39
thread 2:40// 
thread 2:41
thread 2:42
thread 2:43
thread 2:44
thread 2:45
thread 2:46
thread 2:47
thread 2:48
thread 2:49
thread 2:50
thread 1:21
thread 1:22
thread 1:23
thread 1:24
thread 1:25
thread 1:26
thread 1:27
thread 1:28
thread 1:29
thread 1:30
thread 1:31
thread 1:32
thread 1:33
thread 1:34
thread 1:35
thread 1:36
thread 1:37
thread 1:38
thread 1:39
thread 1:40
thread 1:41
thread 1:42
thread 1:43
thread 1:44
thread 1:45
thread 1:46
thread 1:47
thread 1:48
thread 1:49
thread 1:50

4回運転し、毎回異常があります
解く?