changeset 1154:bbad9a21277c

remove Http.run_later
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 04 Feb 2018 20:34:56 -0700
parents 1f4da56abd4f
children 4100304340bc
files src/luan/modules/http/Http.luan src/luan/modules/http/jetty/HttpServicer.java
diffstat 2 files changed, 0 insertions(+), 33 deletions(-) [+]
line wrap: on
line diff
--- a/src/luan/modules/http/Http.luan	Sun Feb 04 20:01:23 2018 -0700
+++ b/src/luan/modules/http/Http.luan	Sun Feb 04 20:34:56 2018 -0700
@@ -160,6 +160,4 @@
 	end
 end
 
-Http.run_later = HttpServicer.run_later
-
 return Http
--- a/src/luan/modules/http/jetty/HttpServicer.java	Sun Feb 04 20:01:23 2018 -0700
+++ b/src/luan/modules/http/jetty/HttpServicer.java	Sun Feb 04 20:34:56 2018 -0700
@@ -170,7 +170,6 @@
 		module.rawPut("response",responseTbl);
 
 		fn.call(luan);
-		handle_run_later(luan);
 		return true;
 	}
 
@@ -247,34 +246,4 @@
 		}
 	}
 
-
-
-	private static String RUN_LATER_KEY = "Http.run_later";
-	private static final Executor exec = Executors.newSingleThreadExecutor();
-
-	public static void run_later(final LuanState luan,final LuanFunction fn,final Object... args) {
-		List list = (List)luan.registry().get(RUN_LATER_KEY);
-		if( list == null ) {
-			list = new ArrayList();
-			luan.registry().put(RUN_LATER_KEY,list);
-		}
-		list.add(
-			new Runnable(){public void run() {
-				try {
-					fn.call(luan,args);
-				} catch(LuanException e) {
-					e.printStackTrace();
-				}
-			}}
-		);
-	}
-
-	private static void handle_run_later(LuanState luan) {
-		List list = (List)luan.registry().get(RUN_LATER_KEY);
-		if( list==null )
-			return;
-		for( Object obj : list ) {
-			exec.execute((Runnable)obj);
-		}
-	}
 }