Mercurial Hosting > luan
diff src/luan/modules/ThreadLuan.java @ 1322:d5739c101bd6
improve Thread
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 06 Feb 2019 01:11:12 -0700 |
parents | 70eecde81820 |
children | f41919741100 |
line wrap: on
line diff
--- a/src/luan/modules/ThreadLuan.java Tue Feb 05 22:36:55 2019 -0700 +++ b/src/luan/modules/ThreadLuan.java Wed Feb 06 01:11:12 2019 -0700 @@ -17,6 +17,7 @@ import luan.LuanTable; import luan.LuanException; import luan.LuanCloner; +import luan.LuanCloneable; public final class ThreadLuan { @@ -155,9 +156,9 @@ } return a; } else { - if( v==null || v instanceof String || v instanceof Boolean || v instanceof Number ) - return v; - return new Unsafe("type "+Luan.type(v)); + if( v instanceof LuanCloneable ) + return new Unsafe("type "+Luan.type(v)); + return v; } } @@ -201,7 +202,7 @@ } } - public static synchronized Callable globalCallable(LuanState luan,String name,long timeout,LuanTable fns) { + public static synchronized Callable globalCallable(LuanState luan,String name,LuanTable fns,long timeout) { Callable callable = callableMap.get(name); if( callable == null ) { sweep();