jdk/test/java/security/Security/SynchronizedAccess.java
changeset 31270 e6470b24700d
parent 10057 03ae05289550
child 40416 5d91b2fd668c
equal deleted inserted replaced
31269:14968253ce7e 31270:e6470b24700d
     1 /*
     1 /*
     2  * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     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
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    45         AccessorThread[] acc = new AccessorThread[200];
    45         AccessorThread[] acc = new AccessorThread[200];
    46         for (int i=0; i < acc.length; i++)
    46         for (int i=0; i < acc.length; i++)
    47             acc[i] = new AccessorThread("thread"+i);
    47             acc[i] = new AccessorThread("thread"+i);
    48         for (int i=0; i < acc.length; i++)
    48         for (int i=0; i < acc.length; i++)
    49             acc[i].start();
    49             acc[i].start();
       
    50         for (int i=0; i < acc.length; i++)
       
    51             acc[i].join();
    50     }
    52     }
    51 }
    53 }
    52 
    54 
    53 class AccessorThread extends Thread {
    55 class AccessorThread extends Thread {
    54 
    56