Skip to content

Instantly share code, notes, and snippets.

@gauravssnl
Forked from shai-almog/RaceCondition.java
Created December 29, 2022 12:40
Show Gist options
  • Save gauravssnl/f5089946cf604bb8d86431422887ff02 to your computer and use it in GitHub Desktop.
Save gauravssnl/f5089946cf604bb8d86431422887ff02 to your computer and use it in GitHub Desktop.
public static void main(String[] argv) throws InterruptedException {
Executors.newVirtualThreadPerTaskExecutor().
execute(() -> {
System.out.print("StringList: " + stringList);
});
stringList = List.of("ZZ", "XX", "LL", "DDD");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment