Browser waits for ajax call to complete even after abort has been called (jQuery)

Thank you for your replies! It turns out I was completely wrong about this being a browser issue – the problem was on the server. ASP.NET serializes requests of the same session that require session state, so in this case, the next page didn’t begin processing on the server until those ajax-initiated requests completed. Unfortunately, … Read more

Killing a .NET thread

Do not call Thread.Abort()! Thread.Abort is dangerous. Instead you should cooperate with the thread so that it can be peacefully shut down. The thread needs to be designed so that it can be told to kill itself, for instance by having a boolean keepGoing flag that you set to false when you want the thread … Read more

How do I abort/cancel TPL Tasks?

You can’t. Tasks use background threads from the thread pool. Also canceling threads using the Abort method is not recommended. You may take a look at the following blog post which explains a proper way of canceling tasks using cancellation tokens. Here’s an example: class Program { static void Main() { var ts = new … Read more