Lines Matching defs:thread

49     private void waitUntilDestruction(SelfDestructiveThread thread, long timeoutMs) {
50 if (!thread.isRunning()) {
62 if (!thread.isRunning()) {
66 throw new RuntimeException("Timeout for waiting thread destruction.");
87 final SelfDestructiveThread thread = new SelfDestructiveThread(
89 thread.postAndWait(new Callable<Object>() {
95 waitUntilDestruction(thread, DEFAULT_TIMEOUT);
96 assertFalse(thread.isRunning());
102 final SelfDestructiveThread thread = new SelfDestructiveThread(
104 Integer generation = thread.postAndWait(new Callable<Integer>() {
107 return thread.getGeneration();
111 waitUntilDestruction(thread, DEFAULT_TIMEOUT);
112 Integer nextGeneration = thread.postAndWait(new Callable<Integer>() {
115 return thread.getGeneration();
125 final SelfDestructiveThread thread = new SelfDestructiveThread(
127 Integer generation = thread.postAndWait(new Callable<Integer>() {
130 return thread.getGeneration();
134 Integer nextGeneration = thread.postAndWait(new Callable<Integer>() {
137 return thread.getGeneration();
141 waitUntilDestruction(thread, DEFAULT_TIMEOUT);
148 final SelfDestructiveThread thread = new SelfDestructiveThread(
150 Integer generation = thread.postAndWait(new Callable<Integer>() {
153 return thread.getGeneration();
159 // Less than renewal duration, so that the same thread must be used.
161 Integer nextGeneration = thread.postAndWait(new Callable<Integer>() {
164 return thread.getGeneration();
170 waitUntilDestruction(thread, DEFAULT_TIMEOUT);
176 final SelfDestructiveThread thread = new SelfDestructiveThread(
181 thread.postAndWait(new Callable<Object>() {
263 final SelfDestructiveThread thread = new SelfDestructiveThread(
268 thread.postAndReply(callable, reply);