File tree Expand file tree Collapse file tree 4 files changed +13
-12
lines changed
Expand file tree Collapse file tree 4 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -2,11 +2,11 @@ name: Rust
22
33on :
44 push :
5- branches-ignore :
6- - trying.tmp
7- - staging.tmp
5+ branches :
6+ - trying
7+ - staging
88 pull_request :
9-
9+
1010env :
1111 RUST_TEST_THREADS : 1
1212
@@ -16,11 +16,11 @@ jobs:
1616 strategy :
1717 matrix :
1818 os : [ubuntu, macos, windows]
19- channel : [1.41 .0, stable, beta, nightly]
19+ channel : [1.49 .0, stable, beta, nightly]
2020 feature : [arc_lock, serde, deadlock_detection]
2121 exclude :
2222 - feature : deadlock_detection
23- channel : ' 1.41 .0'
23+ channel : ' 1.49 .0'
2424 include :
2525 - channel : nightly
2626 feature : nightly
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ changes to the core API do not cause breaking changes for users of `parking_lot`
135135
136136## Minimum Rust version
137137
138- The current minimum required Rust version is 1.41 . Any change to this is
138+ The current minimum required Rust version is 1.49 . Any change to this is
139139considered a breaking change and will require a major version bump.
140140
141141## License
Original file line number Diff line number Diff line change 66// copied, modified, or distributed except according to those terms.
77
88use crate :: thread_parker;
9- use std :: sync :: atomic :: spin_loop_hint ;
9+ use core :: hint :: spin_loop ;
1010
1111// Wastes some CPU time for the given number of iterations,
1212// using a hint to indicate to the CPU that we are spinning.
1313#[ inline]
1414fn cpu_relax ( iterations : u32 ) {
1515 for _ in 0 ..iterations {
16- spin_loop_hint ( )
16+ spin_loop ( )
1717 }
1818}
1919
Original file line number Diff line number Diff line change 88//! A simple spin lock based thread parker. Used on platforms without better
99//! parking facilities available.
1010
11- use core:: sync:: atomic:: { spin_loop_hint, AtomicBool , Ordering } ;
11+ use core:: sync:: atomic:: { AtomicBool , Ordering } ;
12+ use core:: hint:: spin_loop;
1213use std:: thread;
1314use std:: time:: Instant ;
1415
@@ -42,7 +43,7 @@ impl super::ThreadParkerT for ThreadParker {
4243 #[ inline]
4344 unsafe fn park ( & self ) {
4445 while self . parked . load ( Ordering :: Acquire ) != false {
45- spin_loop_hint ( ) ;
46+ spin_loop ( ) ;
4647 }
4748 }
4849
@@ -52,7 +53,7 @@ impl super::ThreadParkerT for ThreadParker {
5253 if Instant :: now ( ) >= timeout {
5354 return false ;
5455 }
55- spin_loop_hint ( ) ;
56+ spin_loop ( ) ;
5657 }
5758 true
5859 }
You can’t perform that action at this time.
0 commit comments