Prevent concurrency issues when completing tasks (#5324)

* Prevent concurrency issues when completing tasks
This commit is contained in:
Mikhail Shilkov 2020-09-11 14:34:43 +02:00 committed by GitHub
parent dee923d99c
commit f0386bec8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View file

@ -30,6 +30,9 @@ _(none)_
- feat(autoapi): Add support for non default secret providers in local workspaces
[#5320](https://github.com/pulumi/pulumi/pull/5320)
- .NET SDK: Prevent a task completion race condition
[#5324](https://github.com/pulumi/pulumi/pull/5324)
## 2.9.2 (2020-08-31)
- Alpha version of the Automation API for Go

View file

@ -117,7 +117,11 @@ namespace Pulumi
await task.ConfigureAwait(false);
// Log the descriptions of completed tasks.
var descriptions = _inFlightTasks[task];
List<string> descriptions;
lock (_inFlightTasks)
{
descriptions = _inFlightTasks[task];
}
foreach (var description in descriptions)
{
Serilog.Log.Information($"Completed task: {description}");