Runner runner = Runner.runner(10); runner.runIn(2, SECONDS, runnable); runner.run(runnable); runner.waitTillDone(); // blocks until all tasks are finished (or failed) // and reuse it runner.runIn(500, MILLISECONDS, callable); runner.waitTillDone(); runner.shutdownAndAwaitTermination();
The code for it can be found here:
https://github.com/MatejTymes/JavaFixes
Hope this will help
No comments:
Post a Comment