mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-07 00:00:09 +02:00
sync: switch branch of loom dev-dependency to master (#1367)
* sync: switch branch of loom dev-dependency to master * replace loom::fuzz with loom::model
This commit is contained in:
@@ -35,4 +35,4 @@ env_logger = { version = "0.5", default-features = false }
|
||||
pin-utils = "0.1.0-alpha.4"
|
||||
tokio = { version = "*", path = "../tokio" }
|
||||
tokio-test = { version = "0.2.0", path = "../tokio-test" }
|
||||
loom = { git = "https://github.com/carllerche/loom", branch = "std-future2", features = ["futures"] }
|
||||
loom = { git = "https://github.com/carllerche/loom", features = ["futures"] }
|
||||
|
||||
@@ -25,7 +25,7 @@ struct Chan {
|
||||
fn basic_notification() {
|
||||
const NUM_NOTIFY: usize = 2;
|
||||
|
||||
loom::fuzz(|| {
|
||||
loom::model(|| {
|
||||
let chan = Arc::new(Chan {
|
||||
num: AtomicUsize::new(0),
|
||||
task: AtomicWaker::new(),
|
||||
|
||||
@@ -29,7 +29,7 @@ fn smoke() {
|
||||
const NUM_TX: usize = 2;
|
||||
const NUM_MSG: usize = 2;
|
||||
|
||||
loom::fuzz(|| {
|
||||
loom::model(|| {
|
||||
let (tx, mut rx) = list::channel();
|
||||
let tx = Arc::new(tx);
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ use loom::thread;
|
||||
|
||||
#[test]
|
||||
fn closing_tx() {
|
||||
loom::fuzz(|| {
|
||||
loom::model(|| {
|
||||
let (mut tx, mut rx) = mpsc::channel(16);
|
||||
|
||||
thread::spawn(move || {
|
||||
|
||||
@@ -14,7 +14,7 @@ use std::task::Poll::{Pending, Ready};
|
||||
|
||||
#[test]
|
||||
fn smoke() {
|
||||
loom::fuzz(|| {
|
||||
loom::model(|| {
|
||||
let (tx, rx) = oneshot::channel();
|
||||
|
||||
thread::spawn(move || {
|
||||
@@ -28,7 +28,7 @@ fn smoke() {
|
||||
|
||||
#[test]
|
||||
fn changing_rx_task() {
|
||||
loom::fuzz(|| {
|
||||
loom::model(|| {
|
||||
let (tx, mut rx) = oneshot::channel();
|
||||
|
||||
thread::spawn(move || {
|
||||
@@ -83,7 +83,7 @@ impl<'a> Future for OnClose<'a> {
|
||||
|
||||
#[test]
|
||||
fn changing_tx_task() {
|
||||
loom::fuzz(|| {
|
||||
loom::model(|| {
|
||||
let (mut tx, rx) = oneshot::channel::<i32>();
|
||||
|
||||
thread::spawn(move || {
|
||||
|
||||
@@ -55,7 +55,7 @@ fn basic_usage() {
|
||||
}
|
||||
}
|
||||
|
||||
loom::fuzz(|| {
|
||||
loom::model(|| {
|
||||
let shared = Arc::new(Shared {
|
||||
semaphore: Semaphore::new(NUM),
|
||||
active: AtomicUsize::new(0),
|
||||
@@ -81,7 +81,7 @@ fn basic_usage() {
|
||||
|
||||
#[test]
|
||||
fn release() {
|
||||
loom::fuzz(|| {
|
||||
loom::model(|| {
|
||||
let semaphore = Arc::new(Semaphore::new(1));
|
||||
|
||||
{
|
||||
@@ -107,7 +107,7 @@ fn release() {
|
||||
fn basic_closing() {
|
||||
const NUM: usize = 2;
|
||||
|
||||
loom::fuzz(|| {
|
||||
loom::model(|| {
|
||||
let semaphore = Arc::new(Semaphore::new(1));
|
||||
|
||||
for _ in 0..NUM {
|
||||
@@ -136,7 +136,7 @@ fn basic_closing() {
|
||||
fn concurrent_close() {
|
||||
const NUM: usize = 3;
|
||||
|
||||
loom::fuzz(|| {
|
||||
loom::model(|| {
|
||||
let semaphore = Arc::new(Semaphore::new(1));
|
||||
|
||||
for _ in 0..NUM {
|
||||
|
||||
Reference in New Issue
Block a user