Cancel long running Task after 5 seconds when not finished
问题 I have created a task which creates an XML string. The task can last multiple seconds. When the task isn't finished after 5 seconds, I want to cancel the Task 'smootly' and continue with writing the rest of the XML. So I built in cancellation inside my task. But although I see the following message in the Log: ProcessInformationTask timed out I also see this line in my log Adding the process information took 10001 ms I wonder why this can happen because I want to cancel the Task after 5