Benign cargo Download

par_bridge.rs

Contains an unbounded block loop
SHA-256d068859548be8379d35f83c62ee74bc5a551263436bd47b62eebb79237105272
MaleculeH(Db)

Evidence

imports crossbeam_deque::Deque lines 1–15
1use crossbeam_deque::{Deque, Stealer, Steal};
2
3use std::thread::yield_now;
4use std::sync::{Mutex, TryLockError};
5use std::sync::atomic::{AtomicUsize, AtomicBool, Ordering};
6
7use iter::ParallelIterator;
8use iter::plumbing::{UnindexedConsumer, UnindexedProducer, bridge_unindexed, Folder};
9use current_num_threads;
10
11/// Conversion trait to convert an `Iterator` to a `ParallelIterator`.
12///
13/// This creates a "bridge" from a sequential iterator to a parallel one, by distributing its items
14/// across the Rayon thread pool. This has the advantage of being able to parallelize just about
15/// anything, …
English function-word token "that" lines 15–19
15:46… ator` can be less efficient than if you started with
16/// `par_iter` instead. However, it can still be useful for iterators that are difficult to
17/// parallelize by other means, like channels or file or network I/O.
18///
19/// …
English function-word token "and" lines 23–25
23:4… To use this trait, take an existing `Iterator` and call `par_bridge` on it. After that, you can
24/// use any of the `ParallelIterator` methods:
25/// …
Contains an unbounded block loop lines 120–125
120:2… let mut count = self.split_count.load(Ordering::SeqCst);
121
122 loop {
123 let done = self.done.load(Ordering::SeqCst);
124 match count.checked_sub(1) {
⋯1 line
English function-word token "have" lines 178–179
178:23… // any panics from other threads will have been caught by the pool,
179 // and will be re-thrown when joined - …

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.