Created
August 17, 2022 15:02
-
-
Save kylec32/006737be4ae73977b6903418e6c3c0be to your computer and use it in GitHub Desktop.
This file contains 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
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