You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using table locks may cause interference with other operations that can be
61
67
safely performed alongside the application-level, exclusive operation.</p>
62
68
<p>Advisory locks can be used by directly executing the stored procedures in the
63
-
database or by using the <ttclass="xref py py-class docutils literal"><spanclass="pre">postgresql.alock.ALock</span></tt> subclasses, which
69
+
database or by using the <aclass="reference internal" href="modules.html#postgresql.alock.ALock" title="postgresql.alock.ALock"><ttclass="xref py py-class docutils literal"><spanclass="pre">postgresql.alock.ALock</span></tt></a> subclasses, which
64
70
provides a context manager that uses those stored procedures.</p>
65
71
<p>Currently, only two subclasses exist. Each represents the lock mode
66
72
supported by PostgreSQL’s advisory locks:</p>
<p><ttclass="xref py py-class docutils literal"><spanclass="pre">postgresql.alock.ALock</span></tt> is similar to <ttclass="xref py py-class docutils literal"><spanclass="pre">threading.RLock</span></tt>; in
93
+
<p><aclass="reference internal" href="modules.html#postgresql.alock.ALock" title="postgresql.alock.ALock"><ttclass="xref py py-class docutils literal"><spanclass="pre">postgresql.alock.ALock</span></tt></a> is similar to <ttclass="xref py py-class docutils literal"><spanclass="pre">threading.RLock</span></tt>; in
88
94
order for an ALock to be released, it must be released the number of times it
89
95
has been acquired. ALocks are associated with and survived by their session.
90
96
Much like how RLocks are associated with the thread they are acquired in:
@@ -108,7 +114,7 @@ <h2>ALocks<a class="headerlink" href="#alocks" title="Permalink to this headline
108
114
functionality. The lock mode is selected by choosing the appropriate subclass.</p>
<dd>Instantiate an ALock object representing the <cite>identifiers</cite> for use with the
114
120
<cite>database</cite>. Exclusive locks will conflict with other exclusive locks and share
@@ -119,12 +125,12 @@ <h2>ALocks<a class="headerlink" href="#alocks" title="Permalink to this headline
119
125
identifier has been acquired by another backend. However, an exclusive lock
120
126
with the same identifier will conflict.</dd>
121
127
</dl>
122
-
</blockquote>
128
+
</div></blockquote>
123
129
<divclass="section" id="alock-interface-points">
124
130
<h3>ALock Interface Points<aclass="headerlink" href="#alock-interface-points" title="Permalink to this headline">¶</a></h3>
125
-
<p>Methods and properties available on <ttclass="xref py py-class docutils literal"><spanclass="pre">postgresql.alock.ALock</span></tt> instances:</p>
131
+
<p>Methods and properties available on <aclass="reference internal" href="modules.html#postgresql.alock.ALock" title="postgresql.alock.ALock"><ttclass="xref py py-class docutils literal"><spanclass="pre">postgresql.alock.ALock</span></tt></a> instances:</p>
<dd><pclass="first">Acquire the advisory locks represented by the <ttclass="docutils literal"><spanclass="pre">alock</span></tt> object. If blocking is
130
136
<cite>True</cite>, the default, the method will block until locks on <em>all</em> the
@@ -144,7 +150,7 @@ <h3>ALock Interface Points<a class="headerlink" href="#alock-interface-points" t
0 commit comments