Increase sleep times for the scheduler
This commit is contained in:
parent
1ded6d328a
commit
f4bcef1113
9 changed files with 10 additions and 10 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue