public void Prep(FCgRoutine r, FCgCoroutinePayload payload) { r.Start(payload.Fiber, payload.Stop, payload.Owner, payload.OwnerName, payload.StartTime, payload.Add, payload.Remove, payload.RoutineType); r.State = ECgRoutineState.Allocating; LogTransaction(ECgCoroutineSchedulerCached.Str.Prep, ECgCoroutineTransaction.Allocate, r); payload.Reset(); }
public FCgRoutine Start(FCgCoroutinePayload payload) { FECgCoroutineSchedule schedule = payload.Schedule; FCgRoutine r = Allocate_Internal(schedule); if (r == null) { payload.Reset(); return(null); } // If NO Head, Make r the Head if (Heads[schedule] == null) { Heads[schedule] = r; Tails[schedule] = r; } // Add r end of the list, Make r the Tail else { FCgRoutine tail = Tails[schedule]; tail.Next = r; r.Prev = tail; Tails[schedule] = r; } RoutinesRunning[schedule].Add(r); // TODO: get Time from Manager_Time r.Start(payload.Fiber, payload.Stop, payload.Owner, payload.OwnerName, payload.StartTime, payload.Add, payload.Remove, payload.RoutineType); r.State = ECgRoutineState.Running; LogTransaction(ECgCoroutineSchedulerCached.Str.Start, ECgCoroutineTransaction.Start, r); payload.Reset(); r.Run(0.0f); return(r); }
public FCgRoutine Allocate(FCgCoroutinePayload payload) { FECgCoroutineSchedule schedule = payload.Schedule; FCgRoutine r = Allocate_Internal(schedule); r.Start(payload.Fiber, payload.Stop, payload.Owner, payload.OwnerName, payload.StartTime, payload.Add, payload.Remove, payload.RoutineType); r.State = ECgRoutineState.Allocating; LogTransaction(ECgCoroutineSchedulerCached.Str.Allocate, ECgCoroutineTransaction.Allocate, r); payload.Reset(); return(r); }