44095 (1) [Avatar] Offline
#1
One item that isn't discussed at all is the use of IProgress with Async.

In a previous project, use of IProgress was challenging, in that the calls the the progress method were also made asynchronously, so it was possible in certain situations for too many calls to be made to the progress method and error out (call stack errors), as they weren't being processed fast enough.

In my situation, the progress items were generating log entries, and depending on the processing speed between progress updates, it would run into issues. In my case, I ended up putting an artificial delay after making a progress call in the async method (1000ms), and it solved it, but not really a good solution. Would love to see a book go indepth on this and discuss best practices in it's use, as when running lots of async items, it's usually necessary to either log, or visually display a status of the items, and the IProgress approach seemed to be the right method of doing this.