mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-29 00:00:11 +02:00
rt: cleanup and simplify scheduler (scheduler v2.5) (#2273)
A refactor of the scheduler internals focusing on simplifying and reducing unsafety. There are no fundamental logic changes. * The state transitions of the core task component are refined and reduced. * `basic_scheduler` has most unsafety removed. * `local_set` has most unsafety removed. * `threaded_scheduler` limits most unsafety to its queue implementation.
This commit is contained in:
@@ -6,7 +6,7 @@ jobs:
|
||||
Linux:
|
||||
vmImage: ubuntu-16.04
|
||||
MacOS:
|
||||
vmImage: macOS-10.13
|
||||
vmImage: macos-latest
|
||||
Windows:
|
||||
vmImage: vs2017-win2016
|
||||
pool:
|
||||
|
||||
@@ -2,6 +2,13 @@ steps:
|
||||
# Linux and macOS.
|
||||
- script: |
|
||||
set -e
|
||||
|
||||
if [ "$RUSTUP_TOOLCHAIN" == "nightly" ]; then
|
||||
echo "++ getting latest miri version"
|
||||
export RUSTUP_TOOLCHAIN="nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri)"
|
||||
echo "$RUSTUP_TOOLCHAIN"
|
||||
fi
|
||||
|
||||
curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain none
|
||||
export PATH=$PATH:$HOME/.cargo/bin
|
||||
rustup toolchain install $RUSTUP_TOOLCHAIN
|
||||
|
||||
+18
-7
@@ -1,6 +1,18 @@
|
||||
jobs:
|
||||
- job: ${{ parameters.name }}
|
||||
displayName: Loom tests
|
||||
strategy:
|
||||
matrix:
|
||||
rest:
|
||||
scope: --skip loom_pool
|
||||
pool_group_a:
|
||||
scope: loom_pool::group_a
|
||||
pool_group_b:
|
||||
scope: loom_pool::group_b
|
||||
pool_group_c:
|
||||
scope: loom_pool::group_c
|
||||
pool_group_d:
|
||||
scope: loom_pool::group_d
|
||||
pool:
|
||||
vmImage: ubuntu-16.04
|
||||
|
||||
@@ -9,10 +21,9 @@ jobs:
|
||||
parameters:
|
||||
rust_version: ${{ parameters.rust }}
|
||||
|
||||
- ${{ each crate in parameters.crates }}:
|
||||
- script: RUSTFLAGS="--cfg loom" cargo test --lib --release --features "full" -- --test-threads=1 --nocapture
|
||||
env:
|
||||
LOOM_MAX_PREEMPTIONS: 1
|
||||
CI: 'True'
|
||||
displayName: test ${{ crate }}
|
||||
workingDirectory: $(Build.SourcesDirectory)/${{ crate }}
|
||||
- script: RUSTFLAGS="--cfg loom" cargo test --lib --release --features "full" -- --nocapture $(scope)
|
||||
env:
|
||||
LOOM_MAX_PREEMPTIONS: 2
|
||||
CI: 'True'
|
||||
displayName: $(scope)
|
||||
workingDirectory: $(Build.SourcesDirectory)/tokio
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
jobs:
|
||||
- job: ${{ parameters.name }}
|
||||
displayName: Miri
|
||||
pool:
|
||||
vmImage: ubuntu-16.04
|
||||
|
||||
steps:
|
||||
- template: azure-install-rust.yml
|
||||
parameters:
|
||||
rust_version: nightly
|
||||
|
||||
- script: |
|
||||
rustup component add miri
|
||||
cargo miri setup
|
||||
rm -rf $(Build.SourcesDirectory)/tokio/tests
|
||||
displayName: Install miri
|
||||
|
||||
# TODO: enable all tests once they pass
|
||||
- script: cargo miri test --features rt-core,rt-threaded,rt-util,sync -- -- task
|
||||
env:
|
||||
CI: 'True'
|
||||
displayName: cargo miri test
|
||||
workingDirectory: $(Build.SourcesDirectory)/tokio
|
||||
@@ -6,7 +6,7 @@ jobs:
|
||||
Linux:
|
||||
vmImage: ubuntu-16.04
|
||||
MacOS:
|
||||
vmImage: macOS-10.13
|
||||
vmImage: macos-latest
|
||||
Windows:
|
||||
vmImage: vs2017-win2016
|
||||
pool:
|
||||
|
||||
@@ -8,7 +8,7 @@ jobs:
|
||||
|
||||
${{ if parameters.cross }}:
|
||||
MacOS:
|
||||
vmImage: macOS-10.13
|
||||
vmImage: macos-latest
|
||||
Windows:
|
||||
vmImage: vs2017-win2016
|
||||
pool:
|
||||
|
||||
Reference in New Issue
Block a user