async wrapper is somehow not working for me. #1783
Unanswered
masterofsync
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I am trying to wrap the reading of the CSV file with async/await but the application still seems to freeze while reading the file. Here is the code that I have:
and I call that method with
var modelToUse = await Task.Run(() => CsvUtility.ReadCsvFile(fileLocationString));
I did test with "await Task.Delay(10000)" to make sure that the async/await wrapper is working and not freezing the application. It seems to only freeze when I use the above code for CsvReader. I have tried using "ReadAsync" as can be seen in the commented out lines of code but still freezes the application until reading is complete. Any help is appreciated! thanks!
Beta Was this translation helpful? Give feedback.
All reactions