I am working on a Web API using ASP.NET Core. My task now is to wait for all request ran to completion when the application is closing. So I think I need somehow to block ma