It's all about the answers!

Ask a question

ProgressMonitor handling in RTC API in case of 'canceled' state

Marko Tomljenovic (31643105) | asked Feb 04 '16, 10:50 a.m.
I was wondering whether there is a rule of thumb I can follow when using RTC API that uses an IProgressMonitor for showing progress and providing support for cancelation.

Can you share you experience what the API (resp. that part that you refer to) does in case the progress monitor gets into state 'canceled'. Does the RTC code then throw an OperationCanceledException, does it simply stop asap or does it ignore it?

Thank you

One answer

permanent link
Geoffrey Clemm (30.1k33035) | answered Feb 04 '16, 8:00 p.m.
Ideally, the operation would stop as soon as it reaches some "safe" state, but my personal (very limited :-) experience is that there are some code contexts where it is just ignored, and other contexts where the operation stops at some safe intermediate point (sometimes a significant amount of time will have elapsed before it reaches a safe intermediate point).   If you describe the specific API being called, we could try to find out a more specific answer.  Or were you wondering how your code should act when it gets passed in a progress monitor?

Your answer

Register or to post your answer.