Hello, I'm trying to sort the things out with the new multithreading model using the await and async keywords.
Now I have a project where I have a lengthly method that I'd preferred to call asyncronously:
Now, I want this method to be called both syncronously and asyncronously depending on certain logic.Code:private void StoreData(List<string> data) { ... }
I've made another method
Now, what should I put into the StoreDataAsync to call the StoreData logic asyncronously?Code:private async void StoreDataAsync(List<string> data) { await ... // ??? }
I certainly can make it work using the old multithreading model, but is it possible to make it work the way I described?




Reply With Quote