From aecb031e795391025d33f3f26f83ab24102ca42f Mon Sep 17 00:00:00 2001 From: Amanieu d'Antras Date: Sat, 28 Aug 2021 16:48:59 +0100 Subject: [PATCH] Undo MSRV bump --- .github/workflows/rust.yml | 4 ++-- README.md | 2 +- core/Cargo.toml | 2 +- core/src/spinwait.rs | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 39c8d2d5..bace0eb7 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -16,11 +16,11 @@ jobs: strategy: matrix: os: [ubuntu, macos, windows] - channel: [1.49.0, stable, beta, nightly] + channel: [1.41.0, stable, beta, nightly] feature: [arc_lock, serde, deadlock_detection] exclude: - feature: deadlock_detection - channel: '1.49.0' + channel: '1.41.0' include: - channel: nightly feature: nightly diff --git a/README.md b/README.md index d3e5b0b3..fa37d14e 100644 --- a/README.md +++ b/README.md @@ -132,7 +132,7 @@ changes to the core API do not cause breaking changes for users of `parking_lot` ## Minimum Rust version -The current minimum required Rust version is 1.36. Any change to this is +The current minimum required Rust version is 1.41. Any change to this is considered a breaking change and will require a major version bump. ## License diff --git a/core/Cargo.toml b/core/Cargo.toml index 1efb25c1..2585329a 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parking_lot_core" -version = "0.8.4" +version = "0.8.5" authors = ["Amanieu d'Antras "] description = "An advanced API for creating custom synchronization primitives." license = "Apache-2.0/MIT" diff --git a/core/src/spinwait.rs b/core/src/spinwait.rs index 84808c15..ad0327a3 100644 --- a/core/src/spinwait.rs +++ b/core/src/spinwait.rs @@ -6,14 +6,14 @@ // copied, modified, or distributed except according to those terms. use crate::thread_parker; -use std::hint; +use std::sync::atomic::spin_loop_hint; // Wastes some CPU time for the given number of iterations, // using a hint to indicate to the CPU that we are spinning. #[inline] fn cpu_relax(iterations: u32) { for _ in 0..iterations { - hint::spin_loop() + spin_loop_hint() } }