ASP NET Core 6 Launch without Debugging doesn't block Background Service but Debug Does
Hi,
I'm trying to have a ASP.NET Core BackgroundService run really in background, i mean really don't interrupt with request/response part and I've been trying many stuff
That is the code i currently have, and one weird thing is if I debug the code, the service blocks the program execution, while if I use run, it doesn't block and continue as expected.
Is there any mistakes there?
Also, is there other ways to do this? I tried Task.Run(), Task.Factory.StartNew() and they all block.
I'm on Jetbrains Rider on Ubuntu 20.04 if that matters for the threading part.
Thanks in advance!
I'm trying to have a ASP.NET Core BackgroundService run really in background, i mean really don't interrupt with request/response part and I've been trying many stuff
That is the code i currently have, and one weird thing is if I debug the code, the service blocks the program execution, while if I use run, it doesn't block and continue as expected.
Is there any mistakes there?
Also, is there other ways to do this? I tried Task.Run(), Task.Factory.StartNew() and they all block.
I'm on Jetbrains Rider on Ubuntu 20.04 if that matters for the threading part.
Thanks in advance!







