Skip to content

Instantly share code, notes, and snippets.

@franz1981
Created November 2, 2023 22:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save franz1981/538367e9eaa6b490b1bf71245f8e28bc to your computer and use it in GitHub Desktop.
Save franz1981/538367e9eaa6b490b1bf71245f8e28bc to your computer and use it in GitHub Desktop.
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class Main {
static {
System.out.println("here we go...");
try (ExecutorService executor = Executors.newVirtualThreadPerTaskExecutor()) {
executor.submit(() -> {}).get();
} catch (Exception e) {
e.printStackTrace();
}
System.out.println("...fiuuu!");
}
public static void main(String[] args) {
}
}
@franz1981
Copy link
Author

...and all the fun, ihih

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment