refs #7703
Change-Id: I848203393d115a0c8f9bbbfbf80e47f35f17616d
importJava "org.simantics.scl.runtime.utils.AsyncUtils" where
- runAsync :: (<Proc> a) -> <Proc> ()
\ No newline at end of file
+ runAsync :: (<Proc> a) -> <Proc> ()
+ pmap :: (a -> b) -> [a] -> [b]
import java.io.PrintWriter;
import java.io.StringWriter;
+import java.util.Arrays;
+import java.util.List;
import org.simantics.scl.runtime.SCLContext;
import org.simantics.scl.runtime.function.Function;
}
}.start();
}
+
+ public static List<Object> pmap(Function f, List<Object> l) {
+ return Arrays.asList(l.parallelStream().map(a -> f.apply(a)).toArray());
+ }
}