docs-v1/api/ImageSharp.Web/SixLabors.ImageSharp.Web.Sy...

488 строки
29 KiB
HTML

<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Class AsyncLock
</title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Class AsyncLock
">
<meta name="generator" content="docfx 2.59.0.0">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../styles/docfx.vendor.css">
<link rel="stylesheet" href="../../styles/docfx.css">
<link rel="stylesheet" href="../../styles/main.css">
<meta property="docfx:navrel" content="../../toc">
<meta property="docfx:tocrel" content="toc">
<meta property="docfx:rel" content="../../">
</head>
<body data-spy="scroll" data-target="#affix" data-offset="120">
<div id="wrapper">
<header>
<nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../../index.html">
<img id="logo" class="svg" src="../../logo.svg" alt="">
</a>
</div>
<div class="collapse navbar-collapse" id="navbar">
<form class="navbar-form navbar-right" role="search" id="search">
<div class="form-group">
<input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
</div>
</form>
<ul class="nav level1 navbar-nav">
<li>
<a href="../../articles/imagesharp/index.html" title="Articles">Articles</a>
</li>
<li>
<a href="../../api/index.html" title="API Documentation">API Documentation</a>
</li>
</ul> </div>
</div>
</nav>
<div class="subnav navbar navbar-default">
<div class="container hide-when-search" id="breadcrumb">
<ul class="breadcrumb">
<li></li>
</ul>
</div>
</div>
</header>
<div class="container body-content">
<div id="search-results">
<div class="search-list">Search Results for <span></span></div>
<div class="sr-items">
<p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
</div>
<ul id="pagination" data-first="First" data-prev="Previous" data-next="Next" data-last="Last"></ul>
</div>
</div>
<div role="main" class="container body-content hide-when-search">
<div class="sidenav hide-when-search">
<a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
<div class="sidetoggle collapse" id="sidetoggle">
<div>
<div class="sidefilter">
<form class="toc-filter">
<span class="glyphicon glyphicon-filter filter-icon"></span>
<input type="text" id="toc_filter_input" placeholder="Enter here to filter..." onkeypress="if(event.keyCode==13) {return false;}">
</form>
</div>
<div class="sidetoc">
<div class="toc" id="toc">
<ul class="nav level1">
<li class="">
<span class="expand-stub"></span>
<a href="SixLabors.ImageSharp.Web.html" title="SixLabors.ImageSharp.Web" class="">SixLabors.ImageSharp.Web</a>
<ul class="nav level2">
<li class="">
<a href="SixLabors.ImageSharp.Web.FormattedImage.html" title="FormattedImage" class="">FormattedImage</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.FormatUtilities.html" title="FormatUtilities" class="">FormatUtilities</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.ImageCacheMetadata.html" title="ImageCacheMetadata" class="">ImageCacheMetadata</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.ImageMetadata.html" title="ImageMetadata" class="">ImageMetadata</a>
</li>
</ul> </li>
<li class="">
<span class="expand-stub"></span>
<a href="SixLabors.ImageSharp.Web.Caching.html" title="SixLabors.ImageSharp.Web.Caching" class="">SixLabors.ImageSharp.Web.Caching</a>
<ul class="nav level2">
<li class="">
<a href="SixLabors.ImageSharp.Web.Caching.CacheHash.html" title="CacheHash" class="">CacheHash</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.Caching.ICacheHash.html" title="ICacheHash" class="">ICacheHash</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.Caching.IImageCache.html" title="IImageCache" class="">IImageCache</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.Caching.PhysicalFileSystemCache.html" title="PhysicalFileSystemCache" class="">PhysicalFileSystemCache</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.Caching.PhysicalFileSystemCacheOptions.html" title="PhysicalFileSystemCacheOptions" class="">PhysicalFileSystemCacheOptions</a>
</li>
</ul> </li>
<li class="">
<span class="expand-stub"></span>
<a href="SixLabors.ImageSharp.Web.Commands.html" title="SixLabors.ImageSharp.Web.Commands" class="">SixLabors.ImageSharp.Web.Commands</a>
<ul class="nav level2">
<li class="">
<a href="SixLabors.ImageSharp.Web.Commands.CommandParser.html" title="CommandParser" class="">CommandParser</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.Commands.DictionaryExtensions.html" title="DictionaryExtensions" class="">DictionaryExtensions</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.Commands.IRequestParser.html" title="IRequestParser" class="">IRequestParser</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.Commands.PresetOnlyQueryCollectionRequestParser.html" title="PresetOnlyQueryCollectionRequestParser" class="">PresetOnlyQueryCollectionRequestParser</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.Commands.PresetOnlyQueryCollectionRequestParserOptions.html" title="PresetOnlyQueryCollectionRequestParserOptions" class="">PresetOnlyQueryCollectionRequestParserOptions</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.Commands.QueryCollectionRequestParser.html" title="QueryCollectionRequestParser" class="">QueryCollectionRequestParser</a>
</li>
</ul> </li>
<li class="">
<span class="expand-stub"></span>
<a href="SixLabors.ImageSharp.Web.Commands.Converters.html" title="SixLabors.ImageSharp.Web.Commands.Converters" class="">SixLabors.ImageSharp.Web.Commands.Converters</a>
<ul class="nav level2">
<li class="">
<a href="SixLabors.ImageSharp.Web.Commands.Converters.ICommandConverter.html" title="ICommandConverter" class="">ICommandConverter</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.Commands.Converters.ICommandConverter-1.html" title="ICommandConverter&lt;T&gt;" class="">ICommandConverter&lt;T&gt;</a>
</li>
</ul> </li>
<li class="">
<span class="expand-stub"></span>
<a href="SixLabors.ImageSharp.Web.DependencyInjection.html" title="SixLabors.ImageSharp.Web.DependencyInjection" class="">SixLabors.ImageSharp.Web.DependencyInjection</a>
<ul class="nav level2">
<li class="">
<a href="SixLabors.ImageSharp.Web.DependencyInjection.ApplicationBuilderExtensions.html" title="ApplicationBuilderExtensions" class="">ApplicationBuilderExtensions</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.DependencyInjection.IImageSharpBuilder.html" title="IImageSharpBuilder" class="">IImageSharpBuilder</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.DependencyInjection.ImageSharpBuilderExtensions.html" title="ImageSharpBuilderExtensions" class="">ImageSharpBuilderExtensions</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.DependencyInjection.ImageSharpConfiguration.html" title="ImageSharpConfiguration" class="">ImageSharpConfiguration</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.DependencyInjection.ServiceCollectionExtensions.html" title="ServiceCollectionExtensions" class="">ServiceCollectionExtensions</a>
</li>
</ul> </li>
<li class="">
<span class="expand-stub"></span>
<a href="SixLabors.ImageSharp.Web.Middleware.html" title="SixLabors.ImageSharp.Web.Middleware" class="">SixLabors.ImageSharp.Web.Middleware</a>
<ul class="nav level2">
<li class="">
<a href="SixLabors.ImageSharp.Web.Middleware.ConcurrentDictionaryExtensions.html" title="ConcurrentDictionaryExtensions" class="">ConcurrentDictionaryExtensions</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.Middleware.ImageCommandContext.html" title="ImageCommandContext" class="">ImageCommandContext</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.Middleware.ImageProcessingContext.html" title="ImageProcessingContext" class="">ImageProcessingContext</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.html" title="ImageSharpMiddleware" class="">ImageSharpMiddleware</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddlewareOptions.html" title="ImageSharpMiddlewareOptions" class="">ImageSharpMiddlewareOptions</a>
</li>
</ul> </li>
<li class="">
<span class="expand-stub"></span>
<a href="SixLabors.ImageSharp.Web.Processors.html" title="SixLabors.ImageSharp.Web.Processors" class="">SixLabors.ImageSharp.Web.Processors</a>
<ul class="nav level2">
<li class="">
<a href="SixLabors.ImageSharp.Web.Processors.BackgroundColorWebProcessor.html" title="BackgroundColorWebProcessor" class="">BackgroundColorWebProcessor</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.Processors.FormatWebProcessor.html" title="FormatWebProcessor" class="">FormatWebProcessor</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.Processors.IImageWebProcessor.html" title="IImageWebProcessor" class="">IImageWebProcessor</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.Processors.JpegQualityWebProcessor.html" title="JpegQualityWebProcessor" class="">JpegQualityWebProcessor</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.Processors.ResizeWebProcessor.html" title="ResizeWebProcessor" class="">ResizeWebProcessor</a>
</li>
</ul> </li>
<li class="">
<span class="expand-stub"></span>
<a href="SixLabors.ImageSharp.Web.Providers.html" title="SixLabors.ImageSharp.Web.Providers" class="">SixLabors.ImageSharp.Web.Providers</a>
<ul class="nav level2">
<li class="">
<a href="SixLabors.ImageSharp.Web.Providers.IImageProvider.html" title="IImageProvider" class="">IImageProvider</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.Providers.PhysicalFileSystemProvider.html" title="PhysicalFileSystemProvider" class="">PhysicalFileSystemProvider</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.Providers.ProcessingBehavior.html" title="ProcessingBehavior" class="">ProcessingBehavior</a>
</li>
</ul> </li>
<li class="">
<span class="expand-stub"></span>
<a href="SixLabors.ImageSharp.Web.Resolvers.html" title="SixLabors.ImageSharp.Web.Resolvers" class="">SixLabors.ImageSharp.Web.Resolvers</a>
<ul class="nav level2">
<li class="">
<a href="SixLabors.ImageSharp.Web.Resolvers.IImageCacheResolver.html" title="IImageCacheResolver" class="">IImageCacheResolver</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.Resolvers.IImageResolver.html" title="IImageResolver" class="">IImageResolver</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.Resolvers.PhysicalFileSystemCacheResolver.html" title="PhysicalFileSystemCacheResolver" class="">PhysicalFileSystemCacheResolver</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.Resolvers.PhysicalFileSystemResolver.html" title="PhysicalFileSystemResolver" class="">PhysicalFileSystemResolver</a>
</li>
</ul> </li>
<li class="">
<span class="expand-stub"></span>
<a href="SixLabors.ImageSharp.Web.Synchronization.html" title="SixLabors.ImageSharp.Web.Synchronization" class="">SixLabors.ImageSharp.Web.Synchronization</a>
<ul class="nav level2">
<li class="">
<a href="SixLabors.ImageSharp.Web.Synchronization.AsyncKeyLock-1.html" title="AsyncKeyLock&lt;TKey&gt;" class="">AsyncKeyLock&lt;TKey&gt;</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.Synchronization.AsyncKeyReaderWriterLock-1.html" title="AsyncKeyReaderWriterLock&lt;TKey&gt;" class="">AsyncKeyReaderWriterLock&lt;TKey&gt;</a>
</li>
<li class="active">
<a href="SixLabors.ImageSharp.Web.Synchronization.AsyncLock.html" title="AsyncLock" class="active">AsyncLock</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.Synchronization.AsyncReaderWriterLock.html" title="AsyncReaderWriterLock" class="">AsyncReaderWriterLock</a>
</li>
<li class="">
<a href="SixLabors.ImageSharp.Web.Synchronization.RefCountedConcurrentDictionary-2.html" title="RefCountedConcurrentDictionary&lt;TKey, TValue&gt;" class="">RefCountedConcurrentDictionary&lt;TKey, TValue&gt;</a>
</li>
</ul> </li>
</ul> </div>
</div>
</div>
</div>
</div>
<div class="article row grid-right">
<div class="col-md-10">
<article class="content wrap" id="_content" data-uid="SixLabors.ImageSharp.Web.Synchronization.AsyncLock">
<h1 id="SixLabors_ImageSharp_Web_Synchronization_AsyncLock" data-uid="SixLabors.ImageSharp.Web.Synchronization.AsyncLock" class="text-break">Class AsyncLock
</h1>
<div class="markdown level0 summary"><p>An asynchronous locker that uses an IDisposable pattern for releasing the lock.</p>
</div>
<div class="markdown level0 conceptual"></div>
<div class="inheritance">
<h5>Inheritance</h5>
<div class="level0"><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object">Object</a></div>
<div class="level1"><span class="xref">AsyncLock</span></div>
</div>
<div classs="implements">
<h5>Implements</h5>
<div><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
</div>
<div class="inheritedMembers">
<h5>Inherited Members</h5>
<div>
<a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">Object.Equals(Object)</a>
</div>
<div>
<a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">Object.Equals(Object, Object)</a>
</div>
<div>
<a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.gethashcode#system-object-gethashcode">Object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.gettype#system-object-gettype">Object.GetType()</a>
</div>
<div>
<a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.memberwiseclone#system-object-memberwiseclone">Object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.referenceequals#system-object-referenceequals(system-object-system-object)">Object.ReferenceEquals(Object, Object)</a>
</div>
<div>
<a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.tostring#system-object-tostring">Object.ToString()</a>
</div>
</div>
<h6><strong>Namespace</strong>: <a class="xref" href="SixLabors.ImageSharp.Web.Synchronization.html">SixLabors.ImageSharp.Web.Synchronization</a></h6>
<h6><strong>Assembly</strong>: SixLabors.ImageSharp.Web.dll</h6>
<h5 id="SixLabors_ImageSharp_Web_Synchronization_AsyncLock_syntax">Syntax</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class AsyncLock : IDisposable</code></pre>
</div>
<h3 id="constructors">Constructors
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/SixLabors/ImageSharp.Web/new/master/apiSpec/new?filename=SixLabors_ImageSharp_Web_Synchronization_AsyncLock__ctor.md&amp;value=---%0Auid%3A%20SixLabors.ImageSharp.Web.Synchronization.AsyncLock.%23ctor%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/SixLabors/ImageSharp.Web/blob/12780011d24ffe1a4f821d600c5bb05e8071b5e9/src/ImageSharp.Web/Synchronization/AsyncLock.cs/#L26">View Source</a>
</span>
<a id="SixLabors_ImageSharp_Web_Synchronization_AsyncLock__ctor_" data-uid="SixLabors.ImageSharp.Web.Synchronization.AsyncLock.#ctor*"></a>
<h4 id="SixLabors_ImageSharp_Web_Synchronization_AsyncLock__ctor" data-uid="SixLabors.ImageSharp.Web.Synchronization.AsyncLock.#ctor">AsyncLock()</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="SixLabors.ImageSharp.Web.Synchronization.AsyncLock.html">AsyncLock</a> class.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public AsyncLock()</code></pre>
</div>
<h3 id="properties">Properties
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/SixLabors/ImageSharp.Web/new/master/apiSpec/new?filename=SixLabors_ImageSharp_Web_Synchronization_AsyncLock_OnRelease.md&amp;value=---%0Auid%3A%20SixLabors.ImageSharp.Web.Synchronization.AsyncLock.OnRelease%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/SixLabors/ImageSharp.Web/blob/12780011d24ffe1a4f821d600c5bb05e8071b5e9/src/ImageSharp.Web/Synchronization/AsyncLock.cs/#L36">View Source</a>
</span>
<a id="SixLabors_ImageSharp_Web_Synchronization_AsyncLock_OnRelease_" data-uid="SixLabors.ImageSharp.Web.Synchronization.AsyncLock.OnRelease*"></a>
<h4 id="SixLabors_ImageSharp_Web_Synchronization_AsyncLock_OnRelease" data-uid="SixLabors.ImageSharp.Web.Synchronization.AsyncLock.OnRelease">OnRelease</h4>
<div class="markdown level1 summary"><p>Gets or sets the callback that should be invoked whenever this lock is released.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Action OnRelease { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.action">Action</a></td>
<td></td>
</tr>
</tbody>
</table>
<h3 id="methods">Methods
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/SixLabors/ImageSharp.Web/new/master/apiSpec/new?filename=SixLabors_ImageSharp_Web_Synchronization_AsyncLock_Dispose.md&amp;value=---%0Auid%3A%20SixLabors.ImageSharp.Web.Synchronization.AsyncLock.Dispose%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/SixLabors/ImageSharp.Web/blob/12780011d24ffe1a4f821d600c5bb05e8071b5e9/src/ImageSharp.Web/Synchronization/AsyncLock.cs/#L75">View Source</a>
</span>
<a id="SixLabors_ImageSharp_Web_Synchronization_AsyncLock_Dispose_" data-uid="SixLabors.ImageSharp.Web.Synchronization.AsyncLock.Dispose*"></a>
<h4 id="SixLabors_ImageSharp_Web_Synchronization_AsyncLock_Dispose" data-uid="SixLabors.ImageSharp.Web.Synchronization.AsyncLock.Dispose">Dispose()</h4>
<div class="markdown level1 summary"><p>Releases all resources used by the current instance of the <a class="xref" href="SixLabors.ImageSharp.Web.Synchronization.AsyncLock.html">AsyncLock</a> class.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Dispose()</code></pre>
</div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/SixLabors/ImageSharp.Web/new/master/apiSpec/new?filename=SixLabors_ImageSharp_Web_Synchronization_AsyncLock_LockAsync.md&amp;value=---%0Auid%3A%20SixLabors.ImageSharp.Web.Synchronization.AsyncLock.LockAsync%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/SixLabors/ImageSharp.Web/blob/12780011d24ffe1a4f821d600c5bb05e8071b5e9/src/ImageSharp.Web/Synchronization/AsyncLock.cs/#L44">View Source</a>
</span>
<a id="SixLabors_ImageSharp_Web_Synchronization_AsyncLock_LockAsync_" data-uid="SixLabors.ImageSharp.Web.Synchronization.AsyncLock.LockAsync*"></a>
<h4 id="SixLabors_ImageSharp_Web_Synchronization_AsyncLock_LockAsync" data-uid="SixLabors.ImageSharp.Web.Synchronization.AsyncLock.LockAsync">LockAsync()</h4>
<div class="markdown level1 summary"><p>Asynchronously obtains the lock. Dispose the returned <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.idisposable">IDisposable</a> to release the lock.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Task&lt;IDisposable&gt; LockAsync()</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a>&lt;<a class="xref" href="https://docs.microsoft.com/dotnet/api/system.idisposable">IDisposable</a>&gt;</td>
<td><p>The <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.idisposable">IDisposable</a> that will release the lock.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="implements">Implements</h3>
<div>
<a class="xref" href="https://docs.microsoft.com/dotnet/api/system.idisposable">System.IDisposable</a>
</div>
</article>
</div>
<div class="hidden-sm col-md-2" role="complementary">
<div class="sideaffix">
<div class="contribution">
<ul class="nav">
<li>
<a href="https://github.com/SixLabors/ImageSharp.Web/new/master/apiSpec/new?filename=SixLabors_ImageSharp_Web_Synchronization_AsyncLock.md&amp;value=---%0Auid%3A%20SixLabors.ImageSharp.Web.Synchronization.AsyncLock%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a>
</li>
<li>
<a href="https://github.com/SixLabors/ImageSharp.Web/blob/12780011d24ffe1a4f821d600c5bb05e8071b5e9/src/ImageSharp.Web/Synchronization/AsyncLock.cs/#L15" class="contribution-link">View Source</a>
</li>
</ul>
</div>
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
<h5>In This Article</h5>
<div></div>
</nav>
</div>
</div>
</div>
</div>
<footer>
<div class="grad-bottom"></div>
<div class="footer">
<div class="container">
<span class="pull-right">
<a href="#top">Back to top</a>
</span>
<span>Generated by <strong>DocFX</strong></span>
</div>
</div>
</footer>
</div>
<script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
<script type="text/javascript" src="../../styles/docfx.js"></script>
<script type="text/javascript" src="../../styles/main.js"></script>
</body>
</html>