project-system icon indicating copy to clipboard operation
project-system copied to clipboard

Review fire-and-forget asynchrony

Open drewnoakes opened this issue 6 years ago • 1 comments

As highlighted by @jmarolf in https://github.com/dotnet/project-system/pull/4529#discussion_r252798620, we have some async operations which fire-and-forget off into the ether. We should review whether these are subject to potential problems in case of project closure or task faults.

  • There are two discarded tasks in DependenciesProjectTreeProvider ~- We have two calls to TplExtensions.Forget (which does nothing with the task at all)~ ~- We have one call to VsTaskLibraryHelper.FileAndForget (which handles faults and reports them via telemetry)~
  • Possibly more cases elsewhere

drewnoakes avatar Jan 31 '19 19:01 drewnoakes

Fire and forgets were banned here: https://github.com/dotnet/project-system/pull/4554. Discarded tasks were not reviewed, but should call IProjectFaultHandlerService.RegisterFaultHandler2 (or whatever the names ends up in the previous PR).

davkean avatar Feb 08 '19 09:02 davkean