The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

44095 (1) [Avatar] Offline
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.