difftastic/rustdoc/rayon_core/struct.ThreadPool.html

199 lines
53 KiB
HTML

This file contains ambiguous Unicode characters!

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><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Represents a user created thread-pool."><title>ThreadPool in rayon_core - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-ac92e1bbe349e143.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="rayon_core" data-themes="" data-resource-suffix="" data-rustdoc-version="1.76.0 (07dca489a 2024-02-04)" data-channel="1.76.0" data-search-js="search-2b6ce74ff89ae146.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../static.files/storage-f2adc0d6ca4d09fb.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-305769736d49e732.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-feafe1bb7466e4bd.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../rayon_core/index.html">rayon_core</a><span class="version">1.12.1</span></h2></div><h2 class="location"><a href="#">ThreadPool</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.broadcast">broadcast</a></li><li><a href="#method.current_num_threads">current_num_threads</a></li><li><a href="#method.current_thread_has_pending_tasks">current_thread_has_pending_tasks</a></li><li><a href="#method.current_thread_index">current_thread_index</a></li><li><a href="#method.in_place_scope">in_place_scope</a></li><li><a href="#method.in_place_scope_fifo">in_place_scope_fifo</a></li><li><a href="#method.install">install</a></li><li><a href="#method.join">join</a></li><li><a href="#method.new">new</a></li><li><a href="#method.scope">scope</a></li><li><a href="#method.scope_fifo">scope_fifo</a></li><li><a href="#method.spawn">spawn</a></li><li><a href="#method.spawn_broadcast">spawn_broadcast</a></li><li><a href="#method.spawn_fifo">spawn_fifo</a></li><li><a href="#method.yield_local">yield_local</a></li><li><a href="#method.yield_now">yield_now</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Debug-for-ThreadPool">Debug</a></li><li><a href="#impl-Drop-for-ThreadPool">Drop</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-ThreadPool">!RefUnwindSafe</a></li><li><a href="#impl-UnwindSafe-for-ThreadPool">!UnwindSafe</a></li><li><a href="#impl-Send-for-ThreadPool">Send</a></li><li><a href="#impl-Sync-for-ThreadPool">Sync</a></li><li><a href="#impl-Unpin-for-ThreadPool">Unpin</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow&lt;T&gt;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut&lt;T&gt;</a></li><li><a href="#impl-From%3CT%3E-for-T">From&lt;T&gt;</a></li><li><a href="#impl-Into%3CU%3E-for-T">Into&lt;U&gt;</a></li><li><a href="#impl-Pointable-for-T">Pointable</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom&lt;U&gt;</a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto&lt;U&gt;</a></li></ul></section><h2><a href="index.html">In crate rayon_core</a></h2></div></nav><div class="sidebar-resizer"></div>
<main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../rayon_core/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="index.html">rayon_core</a>::<wbr><a class="struct" href="#">ThreadPool</a><button id="copy-path" title="Copy item path to clipboard"><img src="../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../src/rayon_core/thread_pool/mod.rs.html#51-53">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub struct ThreadPool { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Represents a user created <a href="https://en.wikipedia.org/wiki/Thread_pool">thread-pool</a>.</p>
<p>Use a <a href="struct.ThreadPoolBuilder.html"><code>ThreadPoolBuilder</code></a> to specify the number and/or names of threads
in the pool. After calling <a href="struct.ThreadPoolBuilder.html#method.build"><code>ThreadPoolBuilder::build()</code></a>, you can then
execute functions explicitly within this <a href="struct.ThreadPool.html"><code>ThreadPool</code></a> using
<a href="struct.ThreadPool.html#method.install"><code>ThreadPool::install()</code></a>. By contrast, top level rayon functions
(like <code>join()</code>) will execute implicitly within the current thread-pool.</p>
<h3 id="creating-a-threadpool"><a href="#creating-a-threadpool">Creating a ThreadPool</a></h3>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>pool = rayon::ThreadPoolBuilder::new().num_threads(<span class="number">8</span>).build().unwrap();</code></pre></div>
<p><a href="struct.ThreadPool.html#method.install"><code>install()</code></a> executes a closure in one of the <code>ThreadPool</code>s
threads. In addition, any other rayon operations called inside of <code>install()</code> will also
execute in the context of the <code>ThreadPool</code>.</p>
<p>When the <code>ThreadPool</code> is dropped, thats a signal for the threads it manages to terminate,
they will complete executing any remaining work that you have spawned, and automatically
terminate.</p>
</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-ThreadPool" class="impl"><a class="src rightside" href="../src/rayon_core/thread_pool/mod.rs.html#55-403">source</a><a href="#impl-ThreadPool" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.ThreadPool.html" title="struct rayon_core::ThreadPool">ThreadPool</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new" class="method"><a class="src rightside" href="../src/rayon_core/thread_pool/mod.rs.html#59-61">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>(configuration: <a class="struct" href="struct.Configuration.html" title="struct rayon_core::Configuration">Configuration</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.ThreadPool.html" title="struct rayon_core::ThreadPool">ThreadPool</a>, <a class="struct" href="https://doc.rust-lang.org/1.76.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/error/trait.Error.html" title="trait core::error::Error">Error</a>&gt;&gt;</h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated: Use <code>ThreadPoolBuilder::build</code></span></div></span></summary><div class="docblock"><p>Deprecated in favor of <code>ThreadPoolBuilder::build</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.install" class="method"><a class="src rightside" href="../src/rayon_core/thread_pool/mod.rs.html#142-148">source</a><h4 class="code-header">pub fn <a href="#method.install" class="fn">install</a>&lt;OP, R&gt;(&amp;self, op: OP) -&gt; R<div class="where">where
OP: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -&gt; R + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,
R: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</div></h4></section></summary><div class="docblock"><p>Executes <code>op</code> within the threadpool. Any attempts to use
<code>join</code>, <code>scope</code>, or parallel iterators will then operate
within that threadpool.</p>
<h5 id="warning-thread-local-data"><a href="#warning-thread-local-data">Warning: thread-local data</a></h5>
<p>Because <code>op</code> is executing within the Rayon thread-pool,
thread-local data from the current thread will not be
accessible.</p>
<h5 id="warning-execution-order"><a href="#warning-execution-order">Warning: execution order</a></h5>
<p>If the current thread is part of a different thread pool, it will try to
keep busy while the <code>op</code> completes in its target pool, similar to
calling <a href="struct.ThreadPool.html#method.yield_now" title="method rayon_core::ThreadPool::yield_now"><code>ThreadPool::yield_now()</code></a> in a loop. Therefore, it may
potentially schedule other tasks to run on the current thread in the
meantime. For example</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">fn </span>main() {
rayon::ThreadPoolBuilder::new().num_threads(<span class="number">1</span>).build_global().unwrap();
<span class="kw">let </span>pool = rayon_core::ThreadPoolBuilder::default().build().unwrap();
<span class="kw">let </span>do_it = || {
<span class="macro">print!</span>(<span class="string">"one "</span>);
pool.install(||{});
<span class="macro">print!</span>(<span class="string">"two "</span>);
};
rayon::join(|| do_it(), || do_it());
}</code></pre></div>
<p>Since we configured just one thread in the global pool, one might
expect <code>do_it()</code> to run sequentially, producing:</p>
<div class="example-wrap"><pre class="language-ascii"><code>one two one two
</code></pre></div>
<p>However each call to <code>install()</code> yields implicitly, allowing rayon to
run multiple instances of <code>do_it()</code> concurrently on the single, global
thread. The following output would be equally valid:</p>
<div class="example-wrap"><pre class="language-ascii"><code>one one two two
</code></pre></div><h5 id="panics"><a href="#panics">Panics</a></h5>
<p>If <code>op</code> should panic, that panic will be propagated.</p>
<h6 id="using-install"><a href="#using-install">Using <code>install()</code></a></h6>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code> <span class="kw">fn </span>main() {
<span class="kw">let </span>pool = rayon::ThreadPoolBuilder::new().num_threads(<span class="number">8</span>).build().unwrap();
<span class="kw">let </span>n = pool.install(|| fib(<span class="number">20</span>));
<span class="macro">println!</span>(<span class="string">"{}"</span>, n);
}
<span class="kw">fn </span>fib(n: usize) -&gt; usize {
<span class="kw">if </span>n == <span class="number">0 </span>|| n == <span class="number">1 </span>{
<span class="kw">return </span>n;
}
<span class="kw">let </span>(a, b) = rayon::join(|| fib(n - <span class="number">1</span>), || fib(n - <span class="number">2</span>)); <span class="comment">// runs inside of `pool`
</span><span class="kw">return </span>a + b;
}</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.broadcast" class="method"><a class="src rightside" href="../src/rayon_core/thread_pool/mod.rs.html#192-199">source</a><h4 class="code-header">pub fn <a href="#method.broadcast" class="fn">broadcast</a>&lt;OP, R&gt;(&amp;self, op: OP) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.76.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;R&gt;<div class="where">where
OP: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(<a class="struct" href="struct.BroadcastContext.html" title="struct rayon_core::BroadcastContext">BroadcastContext</a>&lt;'_&gt;) -&gt; R + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,
R: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</div></h4></section></summary><div class="docblock"><p>Executes <code>op</code> within every thread in the threadpool. Any attempts to use
<code>join</code>, <code>scope</code>, or parallel iterators will then operate within that
threadpool.</p>
<p>Broadcasts are executed on each thread after they have exhausted their
local work queue, before they attempt work-stealing from other threads.
The goal of that strategy is to run everywhere in a timely manner
<em>without</em> being too disruptive to current work. There may be alternative
broadcast styles added in the future for more or less aggressive
injection, if the need arises.</p>
<h5 id="warning-thread-local-data-1"><a href="#warning-thread-local-data-1">Warning: thread-local data</a></h5>
<p>Because <code>op</code> is executing within the Rayon thread-pool,
thread-local data from the current thread will not be
accessible.</p>
<h5 id="panics-1"><a href="#panics-1">Panics</a></h5>
<p>If <code>op</code> should panic on one or more threads, exactly one panic
will be propagated, only after all threads have completed
(or panicked) their own <code>op</code>.</p>
<h5 id="examples"><a href="#examples">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code> <span class="kw">use </span>std::sync::atomic::{AtomicUsize, Ordering};
<span class="kw">fn </span>main() {
<span class="kw">let </span>pool = rayon::ThreadPoolBuilder::new().num_threads(<span class="number">5</span>).build().unwrap();
<span class="comment">// The argument gives context, including the index of each thread.
</span><span class="kw">let </span>v: Vec&lt;usize&gt; = pool.broadcast(|ctx| ctx.index() * ctx.index());
<span class="macro">assert_eq!</span>(v, <span class="kw-2">&amp;</span>[<span class="number">0</span>, <span class="number">1</span>, <span class="number">4</span>, <span class="number">9</span>, <span class="number">16</span>]);
<span class="comment">// The closure can reference the local stack
</span><span class="kw">let </span>count = AtomicUsize::new(<span class="number">0</span>);
pool.broadcast(|<span class="kw">_</span>| count.fetch_add(<span class="number">1</span>, Ordering::Relaxed));
<span class="macro">assert_eq!</span>(count.into_inner(), <span class="number">5</span>);
}</code></pre></div>
</div></details><details class="toggle method-toggle" open><summary><section id="method.current_num_threads" class="method"><a class="src rightside" href="../src/rayon_core/thread_pool/mod.rs.html#213-215">source</a><h4 class="code-header">pub fn <a href="#method.current_num_threads" class="fn">current_num_threads</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the (current) number of threads in the thread pool.</p>
<h5 id="future-compatibility-note"><a href="#future-compatibility-note">Future compatibility note</a></h5>
<p>Note that unless this thread-pool was created with a
<a href="struct.ThreadPoolBuilder.html"><code>ThreadPoolBuilder</code></a> that specifies the number of threads,
then this number may vary over time in future versions (see <a href="struct.ThreadPoolBuilder.html#method.num_threads">the
<code>num_threads()</code> method for details</a>).</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.current_thread_index" class="method"><a class="src rightside" href="../src/rayon_core/thread_pool/mod.rs.html#238-241">source</a><h4 class="code-header">pub fn <a href="#method.current_thread_index" class="fn">current_thread_index</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>&gt;</h4></section></summary><div class="docblock"><p>If called from a Rayon worker thread in this thread-pool,
returns the index of that thread; if not called from a Rayon
thread, or called from a Rayon thread that belongs to a
different thread-pool, returns <code>None</code>.</p>
<p>The index for a given thread will not change over the threads
lifetime. However, multiple threads may share the same index if
they are in distinct thread-pools.</p>
<h5 id="future-compatibility-note-1"><a href="#future-compatibility-note-1">Future compatibility note</a></h5>
<p>Currently, every thread-pool (including the global
thread-pool) has a fixed number of threads, but this may
change in future Rayon versions (see <a href="struct.ThreadPoolBuilder.html#method.num_threads">the <code>num_threads()</code> method
for details</a>). In that case, the index for a
thread would not change during its lifetime, but thread
indices may wind up being reused if threads are terminated and
restarted.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.current_thread_has_pending_tasks" class="method"><a class="src rightside" href="../src/rayon_core/thread_pool/mod.rs.html#265-268">source</a><h4 class="code-header">pub fn <a href="#method.current_thread_has_pending_tasks" class="fn">current_thread_has_pending_tasks</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a>&gt;</h4></section></summary><div class="docblock"><p>Returns true if the current worker thread currently has “local
tasks” pending. This can be useful as part of a heuristic for
deciding whether to spawn a new task or execute code on the
current thread, particularly in breadth-first
schedulers. However, keep in mind that this is an inherently
racy check, as other worker threads may be actively “stealing”
tasks from our local deque.</p>
<p><strong>Background:</strong> Rayons uses a <a href="https://en.wikipedia.org/wiki/Work_stealing">work-stealing</a> scheduler. The
key idea is that each thread has its own <a href="https://en.wikipedia.org/wiki/Double-ended_queue">deque</a> of
tasks. Whenever a new task is spawned whether through
<code>join()</code>, <code>Scope::spawn()</code>, or some other means that new
task is pushed onto the threads <em>local</em> deque. Worker threads
have a preference for executing their own tasks; if however
they run out of tasks, they will go try to “steal” tasks from
other threads. This function therefore has an inherent race
with other active worker threads, which may be removing items
from the local deque.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.join" class="method"><a class="src rightside" href="../src/rayon_core/thread_pool/mod.rs.html#273-281">source</a><h4 class="code-header">pub fn <a href="#method.join" class="fn">join</a>&lt;A, B, RA, RB&gt;(&amp;self, oper_a: A, oper_b: B) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.tuple.html">(RA, RB)</a><div class="where">where
A: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -&gt; RA + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,
B: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() -&gt; RB + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,
RA: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,
RB: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</div></h4></section></summary><div class="docblock"><p>Execute <code>oper_a</code> and <code>oper_b</code> in the thread-pool and return
the results. Equivalent to <code>self.install(|| join(oper_a, oper_b))</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.scope" class="method"><a class="src rightside" href="../src/rayon_core/thread_pool/mod.rs.html#289-295">source</a><h4 class="code-header">pub fn <a href="#method.scope" class="fn">scope</a>&lt;'scope, OP, R&gt;(&amp;self, op: OP) -&gt; R<div class="where">where
OP: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;<a class="struct" href="struct.Scope.html" title="struct rayon_core::Scope">Scope</a>&lt;'scope&gt;) -&gt; R + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,
R: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</div></h4></section></summary><div class="docblock"><p>Creates a scope that executes within this thread-pool.
Equivalent to <code>self.install(|| scope(...))</code>.</p>
<p>See also: <a href="fn.scope.html">the <code>scope()</code> function</a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.scope_fifo" class="method"><a class="src rightside" href="../src/rayon_core/thread_pool/mod.rs.html#304-310">source</a><h4 class="code-header">pub fn <a href="#method.scope_fifo" class="fn">scope_fifo</a>&lt;'scope, OP, R&gt;(&amp;self, op: OP) -&gt; R<div class="where">where
OP: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;<a class="struct" href="struct.ScopeFifo.html" title="struct rayon_core::ScopeFifo">ScopeFifo</a>&lt;'scope&gt;) -&gt; R + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,
R: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</div></h4></section></summary><div class="docblock"><p>Creates a scope that executes within this thread-pool.
Spawns from the same thread are prioritized in relative FIFO order.
Equivalent to <code>self.install(|| scope_fifo(...))</code>.</p>
<p>See also: <a href="fn.scope_fifo.html">the <code>scope_fifo()</code> function</a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.in_place_scope" class="method"><a class="src rightside" href="../src/rayon_core/thread_pool/mod.rs.html#317-322">source</a><h4 class="code-header">pub fn <a href="#method.in_place_scope" class="fn">in_place_scope</a>&lt;'scope, OP, R&gt;(&amp;self, op: OP) -&gt; R<div class="where">where
OP: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;<a class="struct" href="struct.Scope.html" title="struct rayon_core::Scope">Scope</a>&lt;'scope&gt;) -&gt; R,</div></h4></section></summary><div class="docblock"><p>Creates a scope that spawns work into this thread-pool.</p>
<p>See also: <a href="fn.in_place_scope.html">the <code>in_place_scope()</code> function</a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.in_place_scope_fifo" class="method"><a class="src rightside" href="../src/rayon_core/thread_pool/mod.rs.html#329-334">source</a><h4 class="code-header">pub fn <a href="#method.in_place_scope_fifo" class="fn">in_place_scope_fifo</a>&lt;'scope, OP, R&gt;(&amp;self, op: OP) -&gt; R<div class="where">where
OP: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&amp;<a class="struct" href="struct.ScopeFifo.html" title="struct rayon_core::ScopeFifo">ScopeFifo</a>&lt;'scope&gt;) -&gt; R,</div></h4></section></summary><div class="docblock"><p>Creates a scope that spawns work into this thread-pool in FIFO order.</p>
<p>See also: <a href="fn.in_place_scope_fifo.html">the <code>in_place_scope_fifo()</code> function</a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.spawn" class="method"><a class="src rightside" href="../src/rayon_core/thread_pool/mod.rs.html#344-350">source</a><h4 class="code-header">pub fn <a href="#method.spawn" class="fn">spawn</a>&lt;OP&gt;(&amp;self, op: OP)<div class="where">where
OP: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static,</div></h4></section></summary><div class="docblock"><p>Spawns an asynchronous task in this thread-pool. This task will
run in the implicit, global scope, which means that it may outlast
the current stack frame therefore, it cannot capture any references
onto the stack (you will likely need a <code>move</code> closure).</p>
<p>See also: <a href="struct.Scope.html#method.spawn">the <code>spawn()</code> function defined on scopes</a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.spawn_fifo" class="method"><a class="src rightside" href="../src/rayon_core/thread_pool/mod.rs.html#360-366">source</a><h4 class="code-header">pub fn <a href="#method.spawn_fifo" class="fn">spawn_fifo</a>&lt;OP&gt;(&amp;self, op: OP)<div class="where">where
OP: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>() + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static,</div></h4></section></summary><div class="docblock"><p>Spawns an asynchronous task in this thread-pool. This task will
run in the implicit, global scope, which means that it may outlast
the current stack frame therefore, it cannot capture any references
onto the stack (you will likely need a <code>move</code> closure).</p>
<p>See also: <a href="struct.ScopeFifo.html#method.spawn_fifo">the <code>spawn_fifo()</code> function defined on scopes</a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.spawn_broadcast" class="method"><a class="src rightside" href="../src/rayon_core/thread_pool/mod.rs.html#372-378">source</a><h4 class="code-header">pub fn <a href="#method.spawn_broadcast" class="fn">spawn_broadcast</a>&lt;OP&gt;(&amp;self, op: OP)<div class="where">where
OP: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(<a class="struct" href="struct.BroadcastContext.html" title="struct rayon_core::BroadcastContext">BroadcastContext</a>&lt;'_&gt;) + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static,</div></h4></section></summary><div class="docblock"><p>Spawns an asynchronous task on every thread in this thread-pool. This task
will run in the implicit, global scope, which means that it may outlast the
current stack frame therefore, it cannot capture any references onto the
stack (you will likely need a <code>move</code> closure).</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.yield_now" class="method"><a class="src rightside" href="../src/rayon_core/thread_pool/mod.rs.html#387-390">source</a><h4 class="code-header">pub fn <a href="#method.yield_now" class="fn">yield_now</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="enum.Yield.html" title="enum rayon_core::Yield">Yield</a>&gt;</h4></section></summary><div class="docblock"><p>Cooperatively yields execution to Rayon.</p>
<p>This is similar to the general <a href="fn.yield_now.html" title="fn rayon_core::yield_now"><code>yield_now()</code></a>, but only if the current
thread is part of <em>this</em> thread pool.</p>
<p>Returns <code>Some(Yield::Executed)</code> if anything was executed, <code>Some(Yield::Idle)</code> if
nothing was available, or <code>None</code> if the current thread is not part this pool.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.yield_local" class="method"><a class="src rightside" href="../src/rayon_core/thread_pool/mod.rs.html#399-402">source</a><h4 class="code-header">pub fn <a href="#method.yield_local" class="fn">yield_local</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="enum.Yield.html" title="enum rayon_core::Yield">Yield</a>&gt;</h4></section></summary><div class="docblock"><p>Cooperatively yields execution to local Rayon work.</p>
<p>This is similar to the general <a href="fn.yield_local.html" title="fn rayon_core::yield_local"><code>yield_local()</code></a>, but only if the current
thread is part of <em>this</em> thread pool.</p>
<p>Returns <code>Some(Yield::Executed)</code> if anything was executed, <code>Some(Yield::Idle)</code> if
nothing was available, or <code>None</code> if the current thread is not part this pool.</p>
</div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-ThreadPool" class="impl"><a class="src rightside" href="../src/rayon_core/thread_pool/mod.rs.html#411-418">source</a><a href="#impl-Debug-for-ThreadPool" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.ThreadPool.html" title="struct rayon_core::ThreadPool">ThreadPool</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../src/rayon_core/thread_pool/mod.rs.html#412-417">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&amp;self, fmt: &amp;mut <a class="struct" href="https://doc.rust-lang.org/1.76.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/1.76.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Drop-for-ThreadPool" class="impl"><a class="src rightside" href="../src/rayon_core/thread_pool/mod.rs.html#405-409">source</a><a href="#impl-Drop-for-ThreadPool" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/drop/trait.Drop.html" title="trait core::ops::drop::Drop">Drop</a> for <a class="struct" href="struct.ThreadPool.html" title="struct rayon_core::ThreadPool">ThreadPool</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.drop" class="method trait-impl"><a class="src rightside" href="../src/rayon_core/thread_pool/mod.rs.html#406-408">source</a><a href="#method.drop" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/ops/drop/trait.Drop.html#tymethod.drop" class="fn">drop</a>(&amp;mut self)</h4></section></summary><div class='docblock'>Executes the destructor for this type. <a href="https://doc.rust-lang.org/1.76.0/core/ops/drop/trait.Drop.html#tymethod.drop">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-ThreadPool" class="impl"><a href="#impl-RefUnwindSafe-for-ThreadPool" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/1.76.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.ThreadPool.html" title="struct rayon_core::ThreadPool">ThreadPool</a></h3></section><section id="impl-Send-for-ThreadPool" class="impl"><a href="#impl-Send-for-ThreadPool" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.ThreadPool.html" title="struct rayon_core::ThreadPool">ThreadPool</a></h3></section><section id="impl-Sync-for-ThreadPool" class="impl"><a href="#impl-Sync-for-ThreadPool" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.ThreadPool.html" title="struct rayon_core::ThreadPool">ThreadPool</a></h3></section><section id="impl-Unpin-for-ThreadPool" class="impl"><a href="#impl-Unpin-for-ThreadPool" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.ThreadPool.html" title="struct rayon_core::ThreadPool">ThreadPool</a></h3></section><section id="impl-UnwindSafe-for-ThreadPool" class="impl"><a href="#impl-UnwindSafe-for-ThreadPool" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/1.76.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.ThreadPool.html" title="struct rayon_core::ThreadPool">ThreadPool</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.76.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.76.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&amp;T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.76.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&amp;mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.76.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#763">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#766">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#756">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
<p>That is, this conversion is whatever the implementation of
<code><a href="https://doc.rust-lang.org/1.76.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Pointable-for-T" class="impl"><a class="src rightside" href="../src/crossbeam_epoch/atomic.rs.html#194">source</a><a href="#impl-Pointable-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="../crossbeam_epoch/atomic/trait.Pointable.html" title="trait crossbeam_epoch::atomic::Pointable">Pointable</a> for T</h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedconstant.ALIGN" class="associatedconstant trait-impl"><a class="src rightside" href="../src/crossbeam_epoch/atomic.rs.html#195">source</a><a href="#associatedconstant.ALIGN" class="anchor">§</a><h4 class="code-header">const <a href="../crossbeam_epoch/atomic/trait.Pointable.html#associatedconstant.ALIGN" class="constant">ALIGN</a>: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a> = _</h4></section></summary><div class='docblock'>The alignment of pointer.</div></details><details class="toggle" open><summary><section id="associatedtype.Init" class="associatedtype trait-impl"><a href="#associatedtype.Init" class="anchor">§</a><h4 class="code-header">type <a href="../crossbeam_epoch/atomic/trait.Pointable.html#associatedtype.Init" class="associatedtype">Init</a> = T</h4></section></summary><div class='docblock'>The type for initializers.</div></details><details class="toggle method-toggle" open><summary><section id="method.init" class="method trait-impl"><a class="src rightside" href="../src/crossbeam_epoch/atomic.rs.html#199">source</a><a href="#method.init" class="anchor">§</a><h4 class="code-header">unsafe fn <a href="../crossbeam_epoch/atomic/trait.Pointable.html#tymethod.init" class="fn">init</a>(init: &lt;T as <a class="trait" href="../crossbeam_epoch/atomic/trait.Pointable.html" title="trait crossbeam_epoch::atomic::Pointable">Pointable</a>&gt;::<a class="associatedtype" href="../crossbeam_epoch/atomic/trait.Pointable.html#associatedtype.Init" title="type crossbeam_epoch::atomic::Pointable::Init">Init</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a></h4></section></summary><div class='docblock'>Initializes a with the given initializer. <a href="../crossbeam_epoch/atomic/trait.Pointable.html#tymethod.init">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.deref" class="method trait-impl"><a class="src rightside" href="../src/crossbeam_epoch/atomic.rs.html#203">source</a><a href="#method.deref" class="anchor">§</a><h4 class="code-header">unsafe fn <a href="../crossbeam_epoch/atomic/trait.Pointable.html#tymethod.deref" class="fn">deref</a>&lt;'a&gt;(ptr: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&amp;'a T</a></h4></section></summary><div class='docblock'>Dereferences the given pointer. <a href="../crossbeam_epoch/atomic/trait.Pointable.html#tymethod.deref">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.deref_mut" class="method trait-impl"><a class="src rightside" href="../src/crossbeam_epoch/atomic.rs.html#207">source</a><a href="#method.deref_mut" class="anchor">§</a><h4 class="code-header">unsafe fn <a href="../crossbeam_epoch/atomic/trait.Pointable.html#tymethod.deref_mut" class="fn">deref_mut</a>&lt;'a&gt;(ptr: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&amp;'a mut T</a></h4></section></summary><div class='docblock'>Mutably dereferences the given pointer. <a href="../crossbeam_epoch/atomic/trait.Pointable.html#tymethod.deref_mut">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.drop-1" class="method trait-impl"><a class="src rightside" href="../src/crossbeam_epoch/atomic.rs.html#211">source</a><a href="#method.drop-1" class="anchor">§</a><h4 class="code-header">unsafe fn <a href="../crossbeam_epoch/atomic/trait.Pointable.html#tymethod.drop" class="fn">drop</a>(ptr: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>)</h4></section></summary><div class='docblock'>Drops the object pointed to by the given pointer. <a href="../crossbeam_epoch/atomic/trait.Pointable.html#tymethod.drop">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#803-805">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#810">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#788-790">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#795">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html>