Skip to content

Instantly share code, notes, and snippets.

@kylec32
Created August 17, 2022 15:02
Show Gist options
  • Save kylec32/006737be4ae73977b6903418e6c3c0be to your computer and use it in GitHub Desktop.
Save kylec32/006737be4ae73977b6903418e6c3c0be to your computer and use it in GitHub Desktop.
public class PlatformThread {
public static void main(String[] args) {
for (int i = 0; i < 1_000_000; i++) {
if (i%10_000 == 0) {
System.out.println(i);
}
new Thread(() -> {
try {
Thread.sleep(Duration.ofMinutes(10).toMillis());
} catch (Exception e) {
e.printStackTrace();
}}).start();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment