Increase sleep times for the scheduler

This commit is contained in:
JCTyBlaidd 2020-12-07 18:58:31 +00:00 committed by JCTyblaidd
parent 1ded6d328a
commit f4bcef1113
9 changed files with 10 additions and 10 deletions

View file

@ -26,7 +26,7 @@ fn main() {
// Detatch the thread and sleep until it terminates
mem::drop(join);
sleep(Duration::from_millis(100));
sleep(Duration::from_millis(1000));
// Spawn and immediately join a thread
// to execute the join code-path

View file

@ -26,7 +26,7 @@ fn main() {
// Detatch the thread and sleep until it terminates
mem::drop(join);
sleep(Duration::from_millis(100));
sleep(Duration::from_millis(1000));
// Spawn and immediately join a thread
// to execute the join code-path

View file

@ -36,7 +36,7 @@ pub fn main() {
pointer.store(&mut stack_var as *mut _, Ordering::Release);
sleep(Duration::from_millis(100));
sleep(Duration::from_millis(1000));
} //~ ERROR Data race
});

View file

@ -36,7 +36,7 @@ pub fn main() {
pointer.store(&mut stack_var as *mut _, Ordering::Release);
sleep(Duration::from_millis(100));
sleep(Duration::from_millis(1000));
// NOTE: the race is also detected with thread 0, and so reported for thread 0 instead of 2, unsure of the cause.
drop(stack_var);

View file

@ -36,7 +36,7 @@ pub fn main() {
pointer.store(&mut stack_var as *mut _, Ordering::Release);
sleep(Duration::from_millis(100));
sleep(Duration::from_millis(1000));
} //~ ERROR Data race
});

View file

@ -36,7 +36,7 @@ pub fn main() {
pointer.store(&mut stack_var as *mut _, Ordering::Release);
sleep(Duration::from_millis(100));
sleep(Duration::from_millis(1000));
drop(stack_var); //~ ERROR Data race
});

View file

@ -38,7 +38,7 @@ pub fn main() {
pointer.store(&mut stack_var as *mut _, Ordering::Release);
sleep(Duration::from_millis(100));
sleep(Duration::from_millis(1000));
//read
stack_var //~ ERROR Data race

View file

@ -30,7 +30,7 @@ pub fn main() {
let j1 = spawn(move || {
*c.0 = 1;
SYNC.store(1, Ordering::Release);
sleep(Duration::from_millis(100));
sleep(Duration::from_millis(1000));
SYNC.store(3, Ordering::Relaxed);
});
@ -40,7 +40,7 @@ pub fn main() {
});
let j3 = spawn(move || {
sleep(Duration::from_millis(1000));
sleep(Duration::from_millis(5000));
if SYNC.load(Ordering::Acquire) == 3 {
*c.0 //~ ERROR Data race
} else {

View file

@ -38,7 +38,7 @@ pub fn main() {
pointer.store(&mut stack_var as *mut _, Ordering::Release);
sleep(Duration::from_millis(100));
sleep(Duration::from_millis(1000));
stack_var = 1usize; //~ ERROR Data race