If the two calls are sequential then simply:
var x = someFunction()
someOtherFunction()
If you would have written var xTask = SomeFunctionAsync();
await WaitForSomeOtherFunctionAsync();
string x = await xTask;
then it would be: try (var scope = StructuredTaskScope.open()) { // JDK 24+ preview feature
var x = scope.fork(() -> someFunction());
scope.fork(() -> waitForSomeOtherFunction());
scope.join();
String result = x.get(); // already completed
}