Skip to content

Commit aff240a

Browse files
committed
made test join threads
1 parent 1713890 commit aff240a

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/backends/deterministic.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ mod tests {
6161
use std::thread;
6262
#[test]
6363
fn test_deterministic_multithread() {
64-
thread::spawn(|| {
64+
let jh = thread::spawn(|| {
6565
let mut buf = [0u8; 32];
6666
crate::fill(&mut buf).unwrap();
6767
assert_eq!(
@@ -73,7 +73,7 @@ mod tests {
7373
buf
7474
);
7575
});
76-
thread::spawn(|| {
76+
let jh2 = thread::spawn(|| {
7777
let mut buf = [0u8; 32];
7878
crate::fill(&mut buf).unwrap();
7979
assert_eq!(
@@ -85,5 +85,8 @@ mod tests {
8585
buf
8686
);
8787
});
88+
89+
jh.join().unwrap();
90+
jh2.join().unwrap();
8891
}
8992
}

0 commit comments

Comments
 (0)