Project Description

Helper class for locking accross one or several await calls. Based on code developed and described by Stephen Toub,

Enough Software
An Enough Software project.


AsyncLock helps you to synchronized access easily:

private static Enough.Async.AsyncLock _asyncLock = new Enough.Async.AsyncLock();

public async Task<MyDataClass> GetDataAsyncAsync()
  using (await _asyncLock.LockAsync())
    MyDataClass data = await LoadFromStorage();
    if (data == null)
       data = await LoadFromWeb();
       await StoreData(data);
     return data;

For more information please refer to the documentation.


Enough.AsyncLock is available on NuGet.

Last edited Oct 17, 2013 at 7:10 PM by enoughrob, version 7