61 try {
62 for (int i = 0; i < 20; i++) {
63 Thread t = new DoStackOverflow("SpawnedThread " + i);
64 t.start();
65 }
66 run("Main thread");
67 loadLib("test-rwx");
68 run("Main thread");
69 } catch (Exception e) {
70 System.out.println(e);
71 }
72 }
73
74 static class DoStackOverflow extends Thread {
75 public DoStackOverflow(String name) {
76 super(name);
77 }
78 public void run() {
79 for (int i = 0; i < 10; ++i) {
80 TestMT.run(getName());
81 yield();
82 }
83 }
84 }
85 }
|
61 try {
62 for (int i = 0; i < 20; i++) {
63 Thread t = new DoStackOverflow("SpawnedThread " + i);
64 t.start();
65 }
66 run("Main thread");
67 loadLib("test-rwx");
68 run("Main thread");
69 } catch (Exception e) {
70 System.out.println(e);
71 }
72 }
73
74 static class DoStackOverflow extends Thread {
75 public DoStackOverflow(String name) {
76 super(name);
77 }
78 public void run() {
79 for (int i = 0; i < 10; ++i) {
80 TestMT.run(getName());
81 Thread.yield();
82 }
83 }
84 }
85 }
|