MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / main

Method main

lowlevel/ThreadSize.java:13–29  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

11 @Override public void run() { new Nap(1); }
12 }
13 public static void main(String[] args) {
14 ExecutorService exec =
15 Executors.newCachedThreadPool();
16 int count = 0;
17 try {
18 while(true) {
19 exec.execute(new Dummy());
20 count++;
21 }
22 } catch(Error e) {
23 System.out.println(
24 e.getClass().getSimpleName() + ": " + count);
25 System.exit(0);
26 } finally {
27 exec.shutdown();
28 }
29 }
30}

Callers

nothing calls this directly

Calls 1

executeMethod · 0.65

Tested by

no test coverage detected