1 instantiation of AsyncMutex
Microsoft.TemplateEngine.Edge (1)
Settings\AsyncMutex.cs (1)
41
var mutex = new
AsyncMutex
(mutexName, token);
10 references to AsyncMutex
Microsoft.TemplateEngine.Edge (10)
BuiltInManagedProvider\GlobalSettings.cs (3)
23
private volatile
AsyncMutex
? _mutex;
49
var
mutex = await
AsyncMutex
.WaitAsync($"Global\\812CA7F3-7CD8-44B4-B3F0-0159355C0BD5{escapedFilename}", token).ConfigureAwait(false);
Settings\AsyncMutex.cs (7)
13
private readonly TaskCompletionSource<
AsyncMutex
> _taskCompletionSource;
24
_taskCompletionSource = new TaskCompletionSource<
AsyncMutex
>();
34
/// Creates the <see cref="
AsyncMutex
"/> and task for waiting until underlying <see cref="Mutex"/> is acquired.
38
/// <returns>created <see cref="
AsyncMutex
"/>.</returns>
39
public static Task<
AsyncMutex
> WaitAsync(string mutexName, CancellationToken token)
41
var
mutex = new AsyncMutex(mutexName, token);
46
/// Disposes the <see cref="
AsyncMutex
"/>. If disposed, the underlying <see cref="Mutex"/> is released.