|
@@ -1,8 +1,15 @@
|
|
|
public class Main {
|
|
|
public static void main (String argv[]) {
|
|
|
Thread tA, tB;
|
|
|
- tA = new DispTask(false, "tA");
|
|
|
- tB = new DispTask(false, "tB");
|
|
|
+ boolean doYield = false;
|
|
|
+
|
|
|
+ if (doYield)
|
|
|
+ System.out.println("Do yield");
|
|
|
+ else
|
|
|
+ System.out.println("NOT do yield");
|
|
|
+
|
|
|
+ tA = new DispTask(doYield, "tA");
|
|
|
+ tB = new DispTask(doYield, "tB");
|
|
|
|
|
|
tA.start();
|
|
|
tB.start();
|