Created
March 17, 2016 00:14
-
-
Save JohnMurray/d20777a8ff0b8c8bc6c4 to your computer and use it in GitHub Desktop.
Silly Java Threads Question - MOAR THREADS!!!!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (int i = 0; i < 10_000; i++) { | |
Thread t = new Thread(() -> System.out.println("doing something")); | |
t.start(); | |
t.join(); | |
} | |
// Eventually throws java.lang.OutOfMemoryError: unable to create new native thread |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment