]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.graph/src/org/simantics/graph/utils/GraphExecutor.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.graph / src / org / simantics / graph / utils / GraphExecutor.java
diff --git a/bundles/org.simantics.graph/src/org/simantics/graph/utils/GraphExecutor.java b/bundles/org.simantics.graph/src/org/simantics/graph/utils/GraphExecutor.java
new file mode 100644 (file)
index 0000000..b190c66
--- /dev/null
@@ -0,0 +1,12 @@
+package org.simantics.graph.utils;\r
+\r
+import java.util.concurrent.ExecutorService;\r
+import java.util.concurrent.Executors;\r
+\r
+public class GraphExecutor {\r
+       public static final int EXECUTOR_THREADS = Runtime.getRuntime().availableProcessors();\r
+       /**\r
+        * A shared executor for all graph compilers.\r
+        */\r
+       public static final ExecutorService EXECUTOR = Executors.newFixedThreadPool(EXECUTOR_THREADS);\r
+}\r