In my method, I have to call another method (AnotherMethod
) that returns a future.
eg.
private static void myMethod() {
Future<MyObj> mjObj = AnotherMethod();
return;
}
I don't actually care about the value returned by AnotherMethod
(eg. the value of myObj
), but I do want AnotherMethod
to run fully.
If I discard the reference to the future (as in the above example), will AnotherMethod
still finish running?
I understand it won't finish before returning from myMethod
, but will it still complete at some point even though there's no reference to myObj
anymore?