When should you use Task.Run() rather than await?
问题 I am storing the state of my data model. I clone the data model and then want to have it written to "disk" asynchronously. Should I be using Task.Run() which runs it on a background thread? Or should I just make it an async function and not await on it? (this will make it run on the UI thread) Similar stuff to this, but my question is a bit different: async Task.Run with MVVM And what is the criteria to decide which to choose? Thanks! 回答1: You should use Task.Run for CPU-based work that you