When the future is supposed to be executed, it hangs forever. Discovered when testing Oxygene for Java.
The output from the following example is:
Program start
Evaluating future.
Eval test: EvaluateFuture evaluated.
Checkpoint 1 - After first variable
... and hangs
The source code is following
namespace consoleapplication1;
interface
uses
com.remobjects.oxygene.system,
java.util;
type
ConsoleApp = class
public
class method EvalFut: String;
class method Main(args: array of String);
end;
implementation
class method ConsoleApp.EvalFut: String;
begin
System.out.println(“Evaluating future.”);
result := “EvaluateFuture evaluated.”;
end;
class method ConsoleApp.Main(args: array of String);
begin
System.out.println(“Program start”);
System.out.println("Eval test: "+EvalFut);
var a: future String := EvalFut;
System.out.println(“Checkpoint 1 - After first variable”);
var b: String := a;
System.out.println(“Checkpoint 2 - After second variable”);
System.out.println(“Value of b:”+b);
System.in.read;
end;
end.