コード例 #1
0
 public LuaValue call(LuaValue env) {
   globals = env.checkglobals();
   LuaTable coroutine = new LuaTable();
   coroutine.set("create", new create());
   coroutine.set("resume", new resume());
   coroutine.set("running", new running());
   coroutine.set("status", new status());
   coroutine.set("yield", new yield());
   coroutine.set("wrap", new wrap());
   env.set("coroutine", coroutine);
   env.get("package").get("loaded").set("coroutine", coroutine);
   return coroutine;
 }
コード例 #2
0
 public LuaValue call(LuaValue f) {
   return new LuaThread(globals, f.checkfunction());
 }
コード例 #3
0
 public LuaValue call(LuaValue f) {
   final LuaValue func = f.checkfunction();
   final LuaThread thread = new LuaThread(globals, func);
   return new wrapper(thread);
 }
コード例 #4
0
 public LuaValue call(LuaValue t) {
   LuaThread lt = t.checkthread();
   return valueOf(lt.getStatus());
 }