Use thread.Interrupt(); instead of Abort() method.
More Related Contents:
- Parallel.ForEach memory usage keeps growing
- Question about terminating a thread cleanly in .NET
- Trying to run multiple HTTP requests in parallel, but being limited by Windows (registry)
- Accessing UI (Main) Thread safely in WPF
- How should I inject a DbContext instance into an IHostedService?
- Thread.Sleep for less than 1 millisecond
- Is Task.Factory.StartNew() guaranteed to use another thread than the calling thread?
- What is the impact of Thread.Sleep(1) in C#?
- Returning a value from thread?
- When to use thread pool in C#? [closed]
- The current SynchronizationContext may not be used as a TaskScheduler
- How to update textbox on GUI from another thread [duplicate]
- EF Linq Error after change from dotnet Core 2.2.6 to 3.0.0
- auto create database in Entity Framework Core
- Enable OPTIONS header for CORS on .NET Core Web API
- Multithreading reference? [closed]
- Properly locking a List in MultiThreaded Scenarios?
- Could not load file or assembly Microsoft.Extensions.DependencyInjection.Abstractions, Version=1.1.0.0
- Upload files and JSON in ASP.NET Core Web API
- Thread Control.Invoke
- Strange behaviour of Console.ReadKey() with multithreading
- Change the JSON serialization settings of a single ASP.NET Core controller
- Using IConfiguration in C# Class Library
- Why CancellationToken is separate from CancellationTokenSource?
- Create multiple threads and wait for all of them to complete
- How to correctly read an Interlocked.Increment’ed int field?
- Async WebApi Thread.CurrentCulture
- Write to a file from multiple threads asynchronously c#
- System.Timers.Timer/Threading.Timer vs Thread with WhileLoop + Thread.Sleep For Periodic Tasks
- No service for type ‘Microsoft.AspNetCore.Identity.UserManager`1[Microsoft.AspNetCore.Identity.IdentityUser]’ has been registered