Long-running tasks are usually performed in the background thread to keep the UI freezing. It seems that threading logic can be in any view or controller.
As an example (in C #), suppose that or: Is it an advantage to do one or the other? I see two arguments for the controller responsible for thread security. RunAsync is a method called in which a delegate runs a background thread, there are two ways to do this:
// Option 1 See Public Category {Public Zero onButtonClicked () {RunAsync ((=) => Controller. DoSomething ()); }} Public Sector Controller {Public Zero DoSomething () {model.Foo (); }}
// Option 2 See public category {Public Zero onButtonClicked () {controller.DoSomething (); }} Public Sector Controller {Public Zero DoSomething () {RunAsync ((=) => model.Foo ()); }}
Comments
Post a Comment