diff -r bf01be7d1a44 -r e17a1f179bb0 src/Pure/library.scala --- a/src/Pure/library.scala Thu Dec 06 23:07:10 2012 +0100 +++ b/src/Pure/library.scala Fri Dec 07 13:38:32 2012 +0100 @@ -10,6 +10,7 @@ import java.lang.System import java.util.Locale +import java.util.concurrent.{Future => JFuture, TimeUnit} import java.awt.Component import javax.swing.JOptionPane @@ -187,6 +188,18 @@ selection.index = 3 prototypeDisplayValue = Some("00000%") } + + + /* Java futures */ + + def future_value[A](x: A) = new JFuture[A] + { + def cancel(may_interrupt: Boolean): Boolean = false + def isCancelled(): Boolean = false + def isDone(): Boolean = true + def get(): A = x + def get(timeout: Long, time_unit: TimeUnit): A = x + } }