From: Jussi Koskela Date: Thu, 15 Feb 2018 10:48:51 +0000 (+0200) Subject: Add Future to SCL API X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F89%2F1989%2F1;p=simantics%2Fplatform.git Add Future to SCL API refs #7772 Change-Id: Ibcc74f90e3111b720d8969a393e2b115bbeefd72 (cherry picked from commit 8e8367aa523006cefa590f8cda8ed30818a6eb71) --- diff --git a/bundles/org.simantics.scl.runtime/scl/Future.scl b/bundles/org.simantics.scl.runtime/scl/Future.scl new file mode 100644 index 000000000..65bcd88e3 --- /dev/null +++ b/bundles/org.simantics.scl.runtime/scl/Future.scl @@ -0,0 +1,11 @@ +importJava "java.util.concurrent.Future" where + data Future a + + @JavaName get + getFutureResult :: Future a -> a + @JavaName cancel + cancelFuture :: Future a -> Boolean -> Boolean + @JavaName isCancelled + isFutureCancelled :: Future a -> Boolean + @JavaName isDone + isFutureDone :: Future a -> Boolean \ No newline at end of file