This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
<!DOCTYPE html>
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>ConcurrencyModels (infer.InferModules.ConcurrencyModels)</title><linkrel="stylesheet"href="../../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc %%VERSION%%"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><scriptsrc="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divclass="content"><header><nav><ahref="../index.html">Up</a>–<ahref="../../index.html">infer</a>»<ahref="../index.html">InferModules</a>» ConcurrencyModels</nav><h1>Module <code>InferModules.ConcurrencyModels</code></h1></header><divclass="spec module"id="module-F"><ahref="#module-F"class="anchor"></a><code><spanclass="keyword">module</span> F = Stdlib.Format</code></div><dl><dtclass="spec type"id="type-lock_effect"><ahref="#type-lock_effect"class="anchor"></a><code><spanclass="keyword">type</span> lock_effect</code><code> = </code><tableclass="variant"><trid="type-lock_effect.Lock"class="anchored"><tdclass="def constructor"><ahref="#type-lock_effect.Lock"class="anchor"></a><code>| </code><code><spanclass="constructor">Lock</span><spanclass="keyword">of</span><span><ahref="../../../InferIR/InferIR/HilExp/index.html#type-t">InferIR.HilExp.t</a> list</span></code></td><tdclass="doc"><p>simultaneously acquire a list of locks</p></td></tr><trid="type-lock_effect.Unlock"class="anchored"><tdclass="def constructor"><ahref="#type-lock_effect.Unlock"class="anchor"></a><code>| </code><code><spanclass="constructor">Unlock</span><spanclass="keyword">of</span><span><ahref="../../../InferIR/InferIR/HilExp/index.html#type-t">InferIR.HilExp.t</a> list</span></code></td><tdclass="doc"><p>simultaneously release a list of locks</p></td></tr><trid="type-lock_effect.LockedIfTrue"class="anchored"><tdclass="def constructor"><ahref="#type-lock_effect.LockedIfTrue"class="anchor"></a><code>| </code><code><spanclass="constructor">LockedIfTrue</span><spanclass="keyword">of</span><span><ahref="../../../InferIR/InferIR/HilExp/index.html#type-t">InferIR.HilExp.t</a> list</span></code></td><tdclass="doc"><p>simultaneously attempt to acquire a list of locks</p></td></tr><trid="type-lock_effect.GuardConstruct"class="anchored"><tdclass="def constructor"><ahref="#type-lock_effect.GuardConstruct"class="anchor"></a><code>| </code><code><spanclass="constructor">GuardConstruct</span><spanclass="keyword">of</span></code><code>{</code><tableclass="record"><trid="type-lock_effect.guard"class="anchored"><tdclass="def field"><ahref="#type-lock_effect.guard"class="anchor"></a><code>guard : <ahref="../../../InferIR/InferIR/HilExp/index.html#type-t">InferIR.HilExp.t</a>;</code></td></tr><trid="type-lock_effect.lock"class="anchored"><tdclass="def field"><ahref="#type-lock_effect.lock"class="anchor"></a><code>lock : <ahref="../../../InferIR/InferIR/HilExp/index.html#type-t">InferIR.HilExp.t</a>;</code></td></tr><trid="type-lock_effect.acquire_now"class="anchored"><tdclass="def field"><ahref="#type-lock_effect.acquire_now"class="anchor"></a><code>acquire_now : bool;</code></td></tr></table><code>}</code></td><tdclass="doc"><p>mutex guard construction - clang only</p></td></tr><trid="type-lock_effect.GuardLock"class="anchored"><tdclass="def constructor"><ahref="#type-lock_effect.GuardLock"class="anchor"></a><code>| </code><code><spanclass="constructor">GuardLock</span><spanclass="keyword">of</span><ahref="../../../InferIR/InferIR/HilExp/index.html#type-t">InferIR.HilExp.t</a></code></td><tdclass="doc"><p>lock underlying mutex via guard - clang only</p></td></tr><trid="type-lock_effect.GuardLockedIfTrue"class="anchored"><tdclass="def constructor"><ahref="#type-lock_effect.GuardLockedIfTrue"class="anchor"></a><code>| </code><code><spanclass="constructor">GuardLockedIfTrue</span><spanclass="keyword">of</span><ahref="../../../InferIR/InferIR/HilExp/index.html#type-t">InferIR.HilExp.t</a></code></td><tdclass="doc"><p>lock underlying mutex if true via guard - clang only</p></td></tr><trid="type-lock_effect.GuardUnlock"class="anchored"><tdclass="def constructor"><ahref="#type-lock_effect.GuardUnlock"class="anchor"></a><code>| </code><code><spanclass="constructor">GuardUnlock</span><spanclass="keyword">of</span><ahref="../../../InferIR/InferIR/HilExp/index.html#type-t">InferIR.HilExp.t</a></code></td><tdclass="doc"><p>unlock underlying mutex via guard - clang only</p></td></tr><trid="type-lock_effect.GuardDestroy"class="anchored"><tdclass="def constructor"><ahref="#type-lock_effect.GuardDestroy"class="anchor"></a><code>| </code><code><spanclass="constructor">GuardDestroy</span><spanclass="keyword">of</span><ahref="../../../InferIR/InferIR/HilExp/index.html#type-t">InferIR.HilExp.t</a></code></td><tdclass="doc"><p>destroy guard and unlock underlying mutex - clang only</p></td></tr><trid="type-lock_effect.NoEffect"class="anchored"><tdclass="def constructor"><ahref="#type-lock_effect.NoEffect"class="anchor"></a><code>| </code><code><spanclass="constructor">NoEffect</span></code></td><tdclass="doc"><p>function call has no lock-relevant effect</p></td></tr></table></dt><dd><p>effect of call plus Hil expressions being un/locked, if known</p></dd></dl><dl><dtclass="spec type"id="type-thread"><ahref="#type-thread"class="anchor"></a><code><spanclass="keyword">type</span> thread</code><code> = </code><tableclass="variant"><trid="type-thread.BackgroundThread"class="anchored"><tdclass="def constructor"><ahref="#type-thread.BackgroundThread"class="anchor"></a><code>| </code><code><spanclass="constructor">BackgroundThread</span></code></td></tr><trid="type-thread.MainThread"class="anchored"><tdclass="def constructor"><ahref="#type-thread.MainThread"class="anchor"></a><code>| </code><code><spanclass="constructor">MainThread</span></code></td></tr><trid="type-thread.MainThreadIfTrue"class="anchored"><tdclass="def constructor"><ahref="#type-thread.MainThreadIfTrue"class="anchor"></a><code>| </code><code><spanclass="constructor">MainThreadIfTrue</span></code></td></tr><trid="type-thread.UnknownThread"class="anchored"><tdclass="def constructor"><ahref="#type-thread.UnknownThread"class="anchor"></a><code>| </code><code><spanclass="constructor">UnknownThread</span></code></td></tr></table></dt></dl><dl><dtclass="spec value"id="val-is_thread_utils_method"><ahref="#val-is_thread_utils_method"class="anchor"></a><code><spanclass="keyword">val</span> is_thread_utils_method : string <span>-></span><ahref="../../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a><span>-></span> bool</code></dt><dd><p>return true if the given method name is a utility class for checking what thread we're on TODO: clean this up so it takes only a procname</p></dd></dl><dl><dtclass="spec value"id="val-get_lock_effect"><ahref="#val-get_lock_effect"class="anchor"></a><code><spanclass="keyword">val</span> get_lock_effect : <ahref="../../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a><span>-></span><span><ahref="../../../InferIR/InferIR/HilExp/index.html#type-t">InferIR.HilExp.t</a> list</span><span>-></span><ahref="index.html#type-lock_effect">lock_effect</a></code></dt><dd><p>describe how this procedure behaves with respect to locking</p></dd></dl><dl><dtclass="spec value"id="val-get_thread"><ahref="#val-get_thread"class="anchor"></a><code><spanclass="keyword">val</span> get_thread : <ahref="../../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a><span>-></span><ahref="index.html#type-thread">thread</a></code></dt><dd><p>describe how this procedure behaves with respect to thread access</p></dd></dl><dl><dtclass="spec value"id="val-runs_on_ui_thread"><ahref="#val-runs_on_ui_thread"class="anchor"></a><code><spanclass="keyword">val</span> runs_on_ui_thread : <span>attrs_of_pname:<span>(<ahref="../../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a><span>-></span><span><ahref="../../../InferIR/InferIR/ProcAttributes/index.html#type-t">InferIR.ProcAttributes.t</a> option</span>)</span></span><span>-></span><ahref="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a><span>-></span><ahref="../../../InferIR/InferIR/Procdesc/index.html#type-t">InferIR.Procdesc.t</a><span>-></span><span>string option</span></code></dt><dd><p>We don't want to warn on methods that run on the UI thread because they should always be single-threaded. Assume that methods annotated with @UiThread, @OnEvent, @OnBind, @OnMount, @OnUnbind, @OnUnmount always run on the UI thread. Also assume that any superclass marked @UiThread implies all methods are on UI thread. Return Some string explaining why this method is on the UI thread, else return None.</p></dd></dl><dl><dtclass="spec value"id="val-get_current_class_and_annotated_superclasses"><ahref="#val-get_current_class_and_annotated_superclasses"class="anchor"></a><code><spanclass="keyword">val</span> get_current_class_and_annotated_superclasses : <span>(<ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool)</span><span>-></span><ahref="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a><span>-></span><ahref="../../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a><span>-></span><span><span>(<ahref="../../../InferIR/InferIR/Typ/index.html#type-name">InferIR.Typ.name</a> * <span><ahref="../../../InferIR/InferIR/Typ/index.html#type-name">InferIR.Typ.name</a> list</span>)</span> option</span></code></dt><dtclass="spec value"id="val-find_method_or_override_annotated"><ahref="#val-find_method_or_override_annotated"class="anchor"></a><code><spanclass="keyword">val</span> find_method_or_override_annotated : <span>attrs_of_pname:<span>(<ahref="../../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a><span>-></span><span><ahref="../../../InferIR/InferIR/ProcAttributes/index.html#type-t">InferIR.ProcAttributes.t</a> option</span>)</span></span><span>-></span><span>(<ahref="../../../InferIR/InferIR/Annot/Item/index.html#type-t">InferIR.Annot.Item.t</a><span>-></span> bool)</span><span>-></span><ahref="../../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a><span>-></span><ahref="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a><span>-></span><span><ahref="../../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a><ahref="../../../InferStdlib/InferStdlib/index.html#module-IStd">InferStdlib.IStd</a>.sexp_option</span></code></dt><dtclass="spec value"id="val-cpp_lock_types_matcher"><ahref="#val-cpp_lock_types_matcher"class="anchor"></a><code><spanclass="keyword">val</span> cpp_lock_types_matcher : <ahref="../../../InferIR/InferIR/QualifiedCppName/Match/index.html#type-quals_matcher">InferIR.QualifiedCppName.Match.quals_matcher</a></code></dt><dtclass="spec value"id="val-is_recursive_lock_type"><ahref="#val-is_recursive_lock_type"class="anchor"></a><code><spanclass="keyword">val</span> is_recursive_lock_type : <ahref="../../../InferIR/InferIR/Typ/index.html#type-name">InferIR.Typ.name</a><span>-></span> bool</code></dt></dl></div></body></html>