]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Add Future to SCL API 69/1469/1
authorJussi Koskela <jussi.koskela@semantum.fi>
Thu, 15 Feb 2018 10:48:51 +0000 (12:48 +0200)
committerJussi Koskela <jussi.koskela@semantum.fi>
Thu, 15 Feb 2018 10:48:51 +0000 (12:48 +0200)
refs #7772

Change-Id: Ibcc74f90e3111b720d8969a393e2b115bbeefd72

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