File tree 4 files changed +13
-12
lines changed
4 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -2,11 +2,11 @@ name: Rust
2
2
3
3
on :
4
4
push :
5
- branches-ignore :
6
- - trying.tmp
7
- - staging.tmp
5
+ branches :
6
+ - trying
7
+ - staging
8
8
pull_request :
9
-
9
+
10
10
env :
11
11
RUST_TEST_THREADS : 1
12
12
@@ -16,11 +16,11 @@ jobs:
16
16
strategy :
17
17
matrix :
18
18
os : [ubuntu, macos, windows]
19
- channel : [1.41 .0, stable, beta, nightly]
19
+ channel : [1.49 .0, stable, beta, nightly]
20
20
feature : [arc_lock, serde, deadlock_detection]
21
21
exclude :
22
22
- feature : deadlock_detection
23
- channel : ' 1.41 .0'
23
+ channel : ' 1.49 .0'
24
24
include :
25
25
- channel : nightly
26
26
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`
135
135
136
136
## Minimum Rust version
137
137
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
139
139
considered a breaking change and will require a major version bump.
140
140
141
141
## License
Original file line number Diff line number Diff line change 6
6
// copied, modified, or distributed except according to those terms.
7
7
8
8
use crate :: thread_parker;
9
- use std :: sync :: atomic :: spin_loop_hint ;
9
+ use core :: hint :: spin_loop ;
10
10
11
11
// Wastes some CPU time for the given number of iterations,
12
12
// using a hint to indicate to the CPU that we are spinning.
13
13
#[ inline]
14
14
fn cpu_relax ( iterations : u32 ) {
15
15
for _ in 0 ..iterations {
16
- spin_loop_hint ( )
16
+ spin_loop ( )
17
17
}
18
18
}
19
19
Original file line number Diff line number Diff line change 8
8
//! A simple spin lock based thread parker. Used on platforms without better
9
9
//! parking facilities available.
10
10
11
- use core:: sync:: atomic:: { spin_loop_hint, AtomicBool , Ordering } ;
11
+ use core:: sync:: atomic:: { AtomicBool , Ordering } ;
12
+ use core:: hint:: spin_loop;
12
13
use std:: thread;
13
14
use std:: time:: Instant ;
14
15
@@ -42,7 +43,7 @@ impl super::ThreadParkerT for ThreadParker {
42
43
#[ inline]
43
44
unsafe fn park ( & self ) {
44
45
while self . parked . load ( Ordering :: Acquire ) != false {
45
- spin_loop_hint ( ) ;
46
+ spin_loop ( ) ;
46
47
}
47
48
}
48
49
@@ -52,7 +53,7 @@ impl super::ThreadParkerT for ThreadParker {
52
53
if Instant :: now ( ) >= timeout {
53
54
return false ;
54
55
}
55
- spin_loop_hint ( ) ;
56
+ spin_loop ( ) ;
56
57
}
57
58
true
58
59
}
You can’t perform that action at this time.
0 commit comments