Alternative solution to HostingEnvironment.QueueBackgroundWorkItem in .NET Core
问题 We are working with .NET Core Web Api, and looking for a lightweight solution to log requests with variable intensity into database, but don't want client's to wait for the saving process. Unfortunately there's no HostingEnvironment.QueueBackgroundWorkItem(..) implemented in dnx , and Task.Run(..) is not safe. Is there any elegant solution? 回答1: QueueBackgroundWorkItem is gone, but we've got IApplicationLifetime instead of IRegisteredObject , which is being used by the former one. And it