internal TaskBasedRenderingLoop(TModel model, IChangesTrackerFor <TModel> tracker, TView view, IInputEventDispatcher inputEventDispatcher, CancellationToken cancellationToken) { View = view; Tracker = tracker; Model = model; _inputEventDispatcher = inputEventDispatcher; _cancellationToken = cancellationToken; RunningTask = Loop(); }
internal ThreadBasedRenderingLoop(TModel model, IChangesTrackerFor <TModel> tracker, TView view, IInputEventDispatcher inputEventDispatcher, CancellationToken cancellationToken) { _cancellationToken = cancellationToken; View = view; Model = model; Tracker = tracker; _inputEventDispatcher = inputEventDispatcher; Status = RenderingLoopStatuses.Running; RunningThread = new Thread(Loop) { Name = nameof(ThreadBasedRenderingLoop <TModel, TView>), IsBackground = true, Priority = ThreadPriority.Highest, }; RunningThread.Start(); }