Created
September 30, 2014 20:31
-
-
Save jglick/4835f2da45bb9c5e3fa9 to your computer and use it in GitHub Desktop.
Try running in JDK 8u20 under debugger, then uncomment noted line and JPDA hot-reload. Does not work.
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
import java.util.Date; | |
import java.util.function.Consumer; | |
public class ReloadDemo { | |
public static void main(String[] args) throws InterruptedException { | |
while (true) { | |
run((String x) -> System.out.println(x + " first")); | |
run((String x) -> System.out.println(x + " second")); | |
//run((String x) -> System.out.println(x + " third")); | |
Thread.sleep(1000); | |
} | |
} | |
private static void run(Consumer<String> c) { | |
c.accept("Hello @" + new Date()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment