Let's say I have some logic that I want to execute in a separate thread, and then continue with the remaining logic in my method.
If I don't care about the result of the the logic in the separate thread (could complete exceptionally, could complete with a result), can I simply execute the logic via CompletableFuture.runAsync? Just to reiterate, I do not need any information about the state or completion of the logic executed in the separate thread.
For example,
public void doSomething() {
// Don't care about the result of doSomethingElse - only care that execution starts and will complete with some outcome
CompletableFuture.runAsync(() -> doSomethingElse());
// do more things synchronously
return;
}