1/* 2 * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * --- 233 unchanged lines hidden (view full) --- 242 check(! tpe.allowsCoreThreadTimeOut()); 243 t0 = System.nanoTime(); 244 tpe.allowCoreThreadTimeOut(true); 245 check(tpe.allowsCoreThreadTimeOut()); 246 while (tg.activeCount() > 0 && 247 tg.activeCount() > 0) 248 Thread.sleep(4); 249 equal(tg.activeCount(), 0); |
250 |
251 // The following assertion is almost always true, but may 252 // exceptionally not be during a transition from core count 253 // too high to allowCoreThreadTimeOut. Users will never 254 // notice, and we accept the small loss of testability. 255 // 256 // check(System.nanoTime() - t0 >= tpe.getKeepAliveTime(NANOSECONDS)); 257 |
258 //report("idle", tpe); 259 260 tpe.shutdown(); 261 checkShutdown(tpe); 262 check(tpe.awaitTermination(3L, MINUTES)); 263 checkTerminated(tpe); 264 } 265 --- 22 unchanged lines hidden --- |