예제 #1
0
 public ScheduledTaskRecord(FrameContext frame, ISubscheduledContinuation continuation, TaskEventRecord submitterReceipt)
 {
     Frame            = frame;
     Continuation     = continuation;
     SubmitterReceipt = submitterReceipt;
 }
예제 #2
0
 // Call this for a continuation that has been previously blocked with NotifyBlocked. This won't
 // immediately resume the script, but will set it up to be run in interpreter's tick interval.
 public void NotifyUnblocked(FrameContext frame, ISubscheduledContinuation continuation)
 {
     transferRecord(frame, blocked, unblocked, continuation);
 }
예제 #3
0
 // Use to cooperatively stop running for just a single tick.
 public void SetYielded(FrameContext frame, ISubscheduledContinuation continuation)
 {
     transferRecord(frame, active, yielded, continuation);
 }
예제 #4
0
        private void transferRecord(FrameContext frame, List <ScheduledTaskRecord> fromRecords, List <ScheduledTaskRecord> toRecords, ISubscheduledContinuation continuation)
        {
            var recordIdx = findTaskRecordIndex(frame, fromRecords);
            ScheduledTaskRecord record = fromRecords[recordIdx];

            record.Continuation = continuation;
            fromRecords.RemoveAt(recordIdx);
            toRecords.Add(record);
        }