Hi,
I see in the API docs that HTMLDocument.Navigate is “async”, but it’s not coded in a way that allows me to access the underlying task. My concern is, what happens to tasks that get stuck? Decompiling the code, I can see you create an Action and pass in a CancellationToken.None. Would it be possible to modify the API to allow us at very least to control that CancellationToken?
Is there any way today to safely trigger a cancellation of Docum
Thanks!
@CyberChr1s
Could you please clarify what specific functionality you are looking for regarding the cancellation of the HTMLDocument.Navigate() method? Are you asking for a way to implement your own cancellation logic, or are you looking for existing methods to handle stuck tasks?
Yeah, ultimately, I want some way of ensuring the underlying task that Navigate() created can actually be aborted. I fear for Navigate() calls that could take an infinite amount of time. In my first screenshot, you are looking at a decompiled Document.Navigate(string, string). The final call (red arrow) results in the decompiled code in screenshot 2.
image.png (7.8 KB)
You can see that the method call passes in a CancellationToken.None. I would like to be able to provide that via the Navigate() method OR some other means. I don’t know if this cancellation token is being observed at critical times, so also having a Document.AbortNavigate() method would be great! Ultimately, I am looking to avoid having a task pool full of jobs that will never complete.
image.png (5.8 KB)
@CyberChr1s
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): HTMLNET-6251
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.