Fix OneThread

This commit is contained in:
John Kåre Alsaker
2018-04-20 23:50:10 +02:00
parent 577a5b2703
commit d6c63ec949
+3 -1
View File
@@ -36,7 +36,6 @@
use std::fmt::Debug;
use std::fmt::Formatter;
use std::fmt;
use std;
use std::ops::{Deref, DerefMut};
use owning_ref::{Erased, OwningRef};
@@ -200,6 +199,7 @@ pub fn take(&self) -> Option<T> {
use parking_lot::Mutex as InnerLock;
use parking_lot::RwLock as InnerRwLock;
use std;
use std::thread;
pub use rayon::{join, scope};
@@ -638,7 +638,9 @@ pub struct OneThread<T> {
inner: T,
}
#[cfg(parallel_queries)]
unsafe impl<T> std::marker::Sync for OneThread<T> {}
#[cfg(parallel_queries)]
unsafe impl<T> std::marker::Send for OneThread<T> {}
impl<T> OneThread<T> {