0

I have a asp net core server and i was wondering if there is any way in which one can send a request by which it would announce the server to to terminate all other requests (that are waiting to be processed or are under processing ) ? I do not want to kill the server process...i just want to clear both the request queue and the current tasks.

Is there any mechanism in the framework by which you could do that? I have looked in the ThreadPool but it seems it does not expose the current running threads.

My approach would be to safely terminate them if there is such a mechanism.

Bercovici Adrian
  • 8,794
  • 17
  • 73
  • 152
  • Try to check [How to restart asp.net core app programmatically?](https://stackoverflow.com/questions/36121999/how-to-restart-asp-net-core-app-programmatically) – Edward Jan 07 '19 at 02:28
  • How would this help you? And what response should new incoming requests get then? – Ignas Jan 08 '19 at 16:38
  • I do not care about the incoming requests.The thing is that i want to be able to provide a fresh start for the server (fresh start, without killing the root process) – Bercovici Adrian Jan 08 '19 at 20:16

0 Answers0