@@ -96,7 +96,7 @@ macro_rules! parallel {
9696pub fn spawn ( func : impl FnOnce ( ) + DynSend + ' static ) {
9797 if mode:: is_dyn_thread_safe ( ) {
9898 let func = FromDyn :: from ( func) ;
99- rayon_core :: spawn ( || {
99+ rustc_thread_pool :: spawn ( || {
100100 ( func. into_inner ( ) ) ( ) ;
101101 } ) ;
102102 } else {
@@ -107,11 +107,11 @@ pub fn spawn(func: impl FnOnce() + DynSend + 'static) {
107107// This function only works when `mode::is_dyn_thread_safe()`.
108108pub fn scope < ' scope , OP , R > ( op : OP ) -> R
109109where
110- OP : FnOnce ( & rayon_core :: Scope < ' scope > ) -> R + DynSend ,
110+ OP : FnOnce ( & rustc_thread_pool :: Scope < ' scope > ) -> R + DynSend ,
111111 R : DynSend ,
112112{
113113 let op = FromDyn :: from ( op) ;
114- rayon_core :: scope ( |s| FromDyn :: from ( op. into_inner ( ) ( s) ) ) . into_inner ( )
114+ rustc_thread_pool :: scope ( |s| FromDyn :: from ( op. into_inner ( ) ( s) ) ) . into_inner ( )
115115}
116116
117117#[ inline]
@@ -124,7 +124,7 @@ where
124124 let oper_a = FromDyn :: from ( oper_a) ;
125125 let oper_b = FromDyn :: from ( oper_b) ;
126126 let ( a, b) = parallel_guard ( |guard| {
127- rayon_core :: join (
127+ rustc_thread_pool :: join (
128128 move || guard. run ( move || FromDyn :: from ( oper_a. into_inner ( ) ( ) ) ) ,
129129 move || guard. run ( move || FromDyn :: from ( oper_b. into_inner ( ) ( ) ) ) ,
130130 )
@@ -158,7 +158,7 @@ fn par_slice<I: DynSend>(
158158 let ( left, right) = items. split_at_mut ( items. len ( ) / 2 ) ;
159159 let mut left = state. for_each . derive ( left) ;
160160 let mut right = state. for_each . derive ( right) ;
161- rayon_core :: join ( move || par_rec ( * left, state) , move || par_rec ( * right, state) ) ;
161+ rustc_thread_pool :: join ( move || par_rec ( * left, state) , move || par_rec ( * right, state) ) ;
162162 }
163163 }
164164
@@ -241,7 +241,7 @@ pub fn par_map<I: DynSend, T: IntoIterator<Item = I>, R: DynSend, C: FromIterato
241241pub fn broadcast < R : DynSend > ( op : impl Fn ( usize ) -> R + DynSync ) -> Vec < R > {
242242 if mode:: is_dyn_thread_safe ( ) {
243243 let op = FromDyn :: from ( op) ;
244- let results = rayon_core :: broadcast ( |context| op. derive ( op ( context. index ( ) ) ) ) ;
244+ let results = rustc_thread_pool :: broadcast ( |context| op. derive ( op ( context. index ( ) ) ) ) ;
245245 results. into_iter ( ) . map ( |r| r. into_inner ( ) ) . collect ( )
246246 } else {
247247 vec ! [ op( 0 ) ]
0 commit comments