]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.runtime/scl/Async.scl
Async utilities for SCL
[simantics/platform.git] / bundles / org.simantics.scl.runtime / scl / Async.scl
index c47f457ef7d5751aa5e5d0c8bc2056b0219368d5..1988eb5319eebb2c29ed9fa27e2589c766b56f6b 100644 (file)
@@ -1,2 +1,18 @@
+import "Future"
+
+importJava "java.util.concurrent.TimeUnit" where
+    data TimeUnit
+    NANOSECONDS :: TimeUnit
+    MICROSECONDS :: TimeUnit
+    MILLISECONDS :: TimeUnit
+    SECONDS :: TimeUnit
+    HOURS :: TimeUnit
+    DAYS :: TimeUnit
+
 importJava "org.simantics.scl.runtime.utils.AsyncUtils" where
-    runAsync :: (<Proc> a) -> <Proc> ()
\ No newline at end of file
+    runAsync :: (<Proc> a) -> <Proc> ()
+    pmap :: (a -> <Proc> b) -> [a] -> <Proc> [b]
+
+    scheduleAtFixedRate :: (<Proc> a) -> Long -> Long -> TimeUnit -> <Proc> Future a
+    scheduleWithFixedDelay :: (<Proc> a) -> Long -> Long -> TimeUnit -> <Proc> Future a
+    schedule :: (<Proc> a) -> Long -> TimeUnit -> <Proc> Future a
\ No newline at end of file