FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

How to dispose SqlDistributedLock asynchronously? · Issue #20 · madelson/DistributedLock · GitHub

How to dispose SqlDistributedLock asynchronously? #20

Description

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?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL