]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scl.runtime/scl/Async.scl
Fixed multiple issues causing dangling references to discarded queries
[simantics/platform.git] / bundles / org.simantics.scl.runtime / scl / Async.scl
1 import "Future"
2
3 importJava "java.util.concurrent.TimeUnit" where
4     data TimeUnit
5     NANOSECONDS :: TimeUnit
6     MICROSECONDS :: TimeUnit
7     MILLISECONDS :: TimeUnit
8     SECONDS :: TimeUnit
9     HOURS :: TimeUnit
10     DAYS :: TimeUnit
11
12 importJava "org.simantics.scl.runtime.utils.AsyncUtils" where
13     runAsync :: (<Proc> a) -> <Proc> ()
14     pmap :: (a -> <Proc> b) -> [a] -> <Proc> [b]
15
16     scheduleAtFixedRate :: (<Proc> a) -> Long -> Long -> TimeUnit -> <Proc> Future a
17     scheduleWithFixedDelay :: (<Proc> a) -> Long -> Long -> TimeUnit -> <Proc> Future a
18     schedule :: (<Proc> a) -> Long -> TimeUnit -> <Proc> Future a