Winforms - cursor doesn't stay as "WaitCursor" in long running async method
I have an async button click that awaits some long running file i/o stuff. I noticed that for REALLY long i/o stuff (like reading massive files), the wait cursor and controls don't change before hitting that await like in the first two lines of the function below. For smaller files they change without issue. I don't understand why that would matter but that's what is happening.
If I wrap
If I wrap
Importer.ImportFile(item) in a Task.Run, then it seems to work. Not sure why or if that is the right solution.