Skip to content

Instantly share code, notes, and snippets.

async Task Main()
{
// Name of the tool.
const string toolName = "ImportTool";
// Simulate a job that runs for 2 minutes.
var job = new Task(() => {
Thread.Sleep(TimeSpan.FromMinutes(2));
});
public class DistributedMutex {
private readonly string key;
private readonly string storageConnectionString;
private readonly string storageContainerName;
private CloudBlobClient blobClient;
private string leaseId;
public DistributedMutex(string storageConnectionString, string storageContainerName, string key)
{
this.key = key;