Lines Matching defs:thread
20 * Test some basic thread stuff.
24 System.out.println("thread test starting");
29 System.out.println("thread test done");
33 * Simple thread capacity test.
41 for (TestCapacityThread thread : threads) {
42 thread.start();
44 for (TestCapacityThread thread : threads) {
45 thread.join();
48 System.out.println("testThreadCapacity thread count: " + TestCapacityThread.mCount);
51 private static class TestCapacityThread extends Thread {
65 Thread t = new Thread(null, new TestDaemonThread(), "TestDaemonThread", 7168);
69 System.out.print("testThreadDaemons starting thread '" + t.getName() + "'\n");
83 System.out.print("testThreadDaemons @ Thread running\n");
86 Thread.currentThread().setDaemon(true);
93 Thread.sleep(2000);
99 System.out.print("testThreadDaemons @ Thread bailing\n");
105 Thread.currentThread().interrupt();
107 Thread.sleep(0);
110 if (Thread.currentThread().isInterrupted()) {
111 throw new AssertionError("thread is interrupted");
119 Thread thread = new Thread() {
125 thread.start();
126 thread.setName("HelloWorld"); // b/17302037 hang if setName called after start
127 if (!thread.getName().equals("HelloWorld")) {
128 throw new AssertionError("Unexpected thread name: " + thread.getName());
130 thread.join();
131 if (!thread.getName().equals("HelloWorld")) {
132 throw new AssertionError("Unexpected thread name after join: " + thread.getName());