Ejemplo n.º 1
0
        /// <summary>
        /// Schedules an enumerated action.
        /// </summary>
        internal AsyncHandle Schedule(IEnumerator inEnumerator, AsyncFlags inFlags)
        {
            if (inEnumerator == null)
            {
                return(AsyncHandle.Null);
            }

            AsyncWorkUnit unit = AllocUnit(inEnumerator, inFlags);

            ScheduleImpl(unit);
            return(unit.GetHandle());
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Schedules an action.
        /// </summary>
        internal AsyncHandle Schedule(Action inAction, AsyncFlags inFlags)
        {
            if (inAction == null)
            {
                return(AsyncHandle.Null);
            }

            AsyncWorkUnit unit = AllocUnit(inAction, inFlags);

            ScheduleImpl(unit);
            return(unit.GetHandle());
        }