changeset 1106:151dc95f5e73

make thread scheduler public
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 03 Jul 2017 04:22:46 -0600
parents 27bf094f0ae3
children 590437ce0be3
files src/luan/modules/ThreadLuan.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/luan/modules/ThreadLuan.java	Mon Jun 26 23:52:59 2017 -0600
+++ b/src/luan/modules/ThreadLuan.java	Mon Jul 03 04:22:46 2017 -0600
@@ -5,7 +5,7 @@
 import java.util.LinkedHashMap;
 import java.util.concurrent.Executor;
 import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.ScheduledThreadPoolExecutor;
 import java.util.concurrent.ScheduledFuture;
 import java.util.concurrent.TimeUnit;
 import luan.Luan;
@@ -18,7 +18,7 @@
 
 public final class ThreadLuan {
 	private static final Executor exec = Executors.newCachedThreadPool();
-	private static final ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor();
+	public static final ScheduledThreadPoolExecutor scheduler = new ScheduledThreadPoolExecutor(1);
 
 	public static void fork(LuanState luan,LuanFunction fn,Object... args) {
 		LuanCloner cloner = new LuanCloner(LuanCloner.Type.COMPLETE);