private LuaRuntimeExecution CreateCoroutine(DynValue result)
        {
            LuaRuntimeExecution execution = null;

            lock (Executions)
            {
                var id = 0;
                if (Executions.Any())
                {
                    id = Executions.Max(i => i.Id) + 1;
                }

                execution = new LuaRuntimeExecution(id, GlobalScript, result);
            }

            Schedule(execution);

            return(execution);
        }
 private void Schedule(LuaRuntimeExecution execution)
 {
     Executions.Add(execution);
 }