2362N/A * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * @summary Exercise ThreadLocal javadoc "demo" class ThreadId 0N/A * @author Pete Soper 0N/A // number of times to create threads and gather their ids 0N/A // Threads constructed per iteration. ITERATIONCOUNT=50 and 0N/A // THREADCOUNT=50 takes about one second on a sun Blade 1000 (2x750mhz) 0N/A // The thread local storage object for holding per-thread ids 0N/A // Holds the per-thread so main method thread can collect it. JMM 0N/A // guarantees this is valid after this thread joins main method thread. 0N/A // Each child thread just publishes its id value for validation 0N/A // holds true corresponding to a used id value 0N/A // Create and start the threads 0N/A "TestThreadId: Failed with unexpected exception" + e);
0N/A "TestThreadId: Failed with duplicated id: " +
0N/A "TestThreadId: Failed with unexpected id value" + e);