The using
pattern is nice and reads very well.
However, the implicit call to Dispose is doing a synchronous db call and blocking the calling thread so I'd love to see an option to dispose asynchronously, even if it means I can't use the using
keyword in my calling code.
I guess SqlDistributedLock .TryAcquireAsync
could return an interface like this:
IAsyncDisposable : IDisposable
{
Task DisposeAsync();
}
What do you think?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4