< prev index next >

langtools/test/tools/sjavac/PooledExecution.java

Print this page




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 8044131
  27  * @summary Makes sure sjavac poolsize option is honored.
  28  * @modules jdk.compiler/com.sun.tools.sjavac.comp

  29  *          jdk.compiler/com.sun.tools.sjavac.server
  30  * @build Wrapper
  31  * @run main Wrapper PooledExecution
  32  */

  33 import java.util.concurrent.CountDownLatch;
  34 import java.util.concurrent.atomic.AtomicInteger;
  35 
  36 import com.sun.tools.javac.main.Main.Result;
  37 import com.sun.tools.sjavac.comp.PooledSjavac;
  38 import com.sun.tools.sjavac.server.Sjavac;
  39 
  40 
  41 public class PooledExecution {
  42 
  43     public static void main(String[] args) throws InterruptedException {
  44         new PooledExecutionTest().runTest();
  45     }
  46 
  47     static class PooledExecutionTest {
  48 
  49         final int POOL_SIZE = 15;
  50         final int NUM_REQUESTS = 100;
  51 
  52         // Number of tasks that has not yet started




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 8044131
  27  * @summary Makes sure sjavac poolsize option is honored.
  28  * @modules jdk.compiler/com.sun.tools.javac.main
  29  *          jdk.compiler/com.sun.tools.sjavac.comp
  30  *          jdk.compiler/com.sun.tools.sjavac.server
  31  * @build Wrapper
  32  * @run main Wrapper PooledExecution
  33  */
  34 
  35 import java.util.concurrent.CountDownLatch;
  36 import java.util.concurrent.atomic.AtomicInteger;
  37 
  38 import com.sun.tools.javac.main.Main.Result;
  39 import com.sun.tools.sjavac.comp.PooledSjavac;
  40 import com.sun.tools.sjavac.server.Sjavac;
  41 
  42 
  43 public class PooledExecution {
  44 
  45     public static void main(String[] args) throws InterruptedException {
  46         new PooledExecutionTest().runTest();
  47     }
  48 
  49     static class PooledExecutionTest {
  50 
  51         final int POOL_SIZE = 15;
  52         final int NUM_REQUESTS = 100;
  53 
  54         // Number of tasks that has not yet started


< prev index next >