From my ASP.NET Core 2.2 application, I am having to call a 3rd party library that is prone to pushing the CPU to 100% and basically hanging the machine - happens at least twice a month. I have no access to the source nor will the vendor fix it.
My solution to this problem was to isolate this 3rd party library in a .NET Framework 4.x web service where I can call Thread.Abort it if I detect issues. The reason for isolating it in a .NET Framework service rather than .NET Core, is because the latter doesn't support Thread.Abort. The current solution, while not ideal, works. Even knowing that Thread.Abort could cause instability (hasn't so far).
I'd rather not have the library isolated for performance reasons. But so far, I haven't found a way to kill a runaway thread (or Task) in a .NET Core project.
What are the alternatives that are available to me?