<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Distributed lock on Dapr Docs</title><link>https://v1-18.docs.dapr.io/developing-applications/building-blocks/distributed-lock/</link><description>Recent content in Distributed lock on Dapr Docs</description><generator>Hugo</generator><language>en</language><atom:link href="https://v1-18.docs.dapr.io/developing-applications/building-blocks/distributed-lock/index.xml" rel="self" type="application/rss+xml"/><item><title>Distributed lock overview</title><link>https://v1-18.docs.dapr.io/developing-applications/building-blocks/distributed-lock/distributed-lock-api-overview/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/developing-applications/building-blocks/distributed-lock/distributed-lock-api-overview/</guid><description>&lt;h2 id="introduction">Introduction&lt;/h2>
&lt;p>Locks are used to provide mutually exclusive access to a resource. For example, you can use a lock to:&lt;/p>
&lt;ul>
&lt;li>Provide exclusive access to a database row, table, or an entire database&lt;/li>
&lt;li>Lock reading messages from a queue in a sequential manner&lt;/li>
&lt;/ul>
&lt;p>Any resource that is shared where updates occur can be the target for a lock. Locks are usually used on operations that mutate state, not on reads.&lt;/p>
&lt;p>Each lock has a name. The application determines the resources that the named lock accesses. Typically, multiple instances of the same application use this named lock to exclusively access the resource and perform updates.&lt;/p></description></item><item><title>How-To: Use a lock</title><link>https://v1-18.docs.dapr.io/developing-applications/building-blocks/distributed-lock/howto-use-distributed-lock/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/developing-applications/building-blocks/distributed-lock/howto-use-distributed-lock/</guid><description>&lt;p>Now that you&amp;rsquo;ve learned what the Dapr distributed lock API building block provides, learn how it can work in your service. In this guide, an example application acquires a lock using the Redis lock component to demonstrate how to lock resources. For a list of supported lock stores, see &lt;a href="https://v1-18.docs.dapr.io/reference/components-reference/supported-locks/">this reference page&lt;/a>.&lt;/p>
&lt;p>In the diagram below, two instances of the same application acquire a lock, where one instance is successful and the other is denied.&lt;/p></description></item></channel></rss>