Created
October 21, 2018 07:14
-
-
Save exhesham/8b32aedaa5a0b23b0afe4e6dc5072148 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
public class RunnableJob implements Runnable{ | |
@Override | |
public void run() { | |
} | |
} | |
public void runJobs(){ | |
CompletableFuture<Void> f = CompletableFuture.runAsync(new RunnableJob()); | |
f.thenRun(new RunnableJob()); | |
CompletableFuture<RunnableJob> f2 = CompletableFuture.supplyAsync(()->new RunnableJob()); | |
f2.thenRun(new RunnableJob()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment