Skip to content

Commit e70fddd

Browse files
Format trace in test
1 parent a4c1085 commit e70fddd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/concurrent-panics.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ fn parent() {
4545
fn child() {
4646
let done = Arc::new(AtomicBool::new(false));
4747
let done2 = done.clone();
48-
let a = thread::spawn(move || {
49-
while !done2.load(SeqCst) {
50-
format!("{:?}", backtrace::Backtrace::new());
48+
let a = thread::spawn(move || loop {
49+
if done2.load(SeqCst) {
50+
break format!("{:?}", backtrace::Backtrace::new());
5151
}
5252
});
5353

0 commit comments

Comments
 (0)