]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Add Future to SCL API 89/1989/1
authorJussi Koskela <jussi.koskela@semantum.fi>
Thu, 15 Feb 2018 10:48:51 +0000 (12:48 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Sat, 4 Aug 2018 20:21:33 +0000 (20:21 +0000)
refs #7772

Change-Id: Ibcc74f90e3111b720d8969a393e2b115bbeefd72
(cherry picked from commit 8e8367aa523006cefa590f8cda8ed30818a6eb71)

bundles/org.simantics.scl.runtime/scl/Future.scl [new file with mode: 0644]

diff --git a/bundles/org.simantics.scl.runtime/scl/Future.scl b/bundles/org.simantics.scl.runtime/scl/Future.scl
new file mode 100644 (file)
index 0000000..65bcd88
--- /dev/null
@@ -0,0 +1,11 @@
+importJava "java.util.concurrent.Future" where
+    data Future a
+    
+    @JavaName get
+    getFutureResult :: Future a -> <Proc, Exception> a
+    @JavaName cancel
+    cancelFuture :: Future a -> Boolean -> <Proc> Boolean
+    @JavaName isCancelled
+    isFutureCancelled :: Future a -> <Proc> Boolean
+    @JavaName isDone
+    isFutureDone :: Future a -> <Proc> Boolean
\ No newline at end of file