parent
a55e4410bc
commit
d834a7ff2a
@ -0,0 +1,41 @@
|
|||||||
|
From aaf3296c9470a094f740d004444b45065d00a730 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Josh Stone <cuviper@gmail.com>
|
||||||
|
Date: Wed, 12 Jun 2019 20:45:51 -0700
|
||||||
|
Subject: [PATCH] Update to crossbeam-deque 0.7
|
||||||
|
|
||||||
|
---
|
||||||
|
src/iter/par_bridge.rs | 7 ++++---
|
||||||
|
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/iter/par_bridge.rs b/src/iter/par_bridge.rs
|
||||||
|
index b366de698243..c8197ea65a48 100644
|
||||||
|
--- a/src/iter/par_bridge.rs
|
||||||
|
+++ b/src/iter/par_bridge.rs
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-use crossbeam_deque::{self as deque, Steal, Stealer, Worker};
|
||||||
|
+use crossbeam_deque::{Steal, Stealer, Worker};
|
||||||
|
|
||||||
|
use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
|
||||||
|
use std::sync::{Mutex, TryLockError};
|
||||||
|
@@ -79,7 +79,8 @@ where
|
||||||
|
C: UnindexedConsumer<Self::Item>,
|
||||||
|
{
|
||||||
|
let split_count = AtomicUsize::new(current_num_threads());
|
||||||
|
- let (worker, stealer) = deque::fifo();
|
||||||
|
+ let worker = Worker::new_fifo();
|
||||||
|
+ let stealer = worker.stealer();
|
||||||
|
let done = AtomicBool::new(false);
|
||||||
|
let iter = Mutex::new((self.iter, worker));
|
||||||
|
|
||||||
|
@@ -149,7 +150,7 @@ where
|
||||||
|
{
|
||||||
|
loop {
|
||||||
|
match self.items.steal() {
|
||||||
|
- Steal::Data(it) => {
|
||||||
|
+ Steal::Success(it) => {
|
||||||
|
folder = folder.consume(it);
|
||||||
|
if folder.full() {
|
||||||
|
return folder;
|
||||||
|
--
|
||||||
|
2.21.0
|
||||||
|
|
Loading…
Reference in new issue