Last active
February 20, 2017 21:41
-
-
Save ljnelson/dd5d23e4ab1fb3e128588978c5e2bcdf 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
private final CountDownLatch latch; | |
private final Collection<HttpServer> startedHttpServers; | |
public HttpServerStartingExtension() { | |
super(); | |
this.startedHttpServers = new LinkedList<>(); | |
this.latch = new CountDownLatch(1); | |
Runtime.getRuntime().addShutdownHook(new Thread(() -> { | |
latch.countDown(); | |
})); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment