File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ fn wait_wake() {
132
132
133
133
static FUTEX : i32 = 0 ;
134
134
135
- thread:: spawn ( move || {
135
+ let t = thread:: spawn ( move || {
136
136
thread:: sleep ( Duration :: from_millis ( 200 ) ) ;
137
137
unsafe {
138
138
assert_eq ! ( libc:: syscall(
@@ -155,14 +155,15 @@ fn wait_wake() {
155
155
}
156
156
157
157
assert ! ( ( 200 ..1000 ) . contains( & start. elapsed( ) . as_millis( ) ) ) ;
158
+ t. join ( ) . unwrap ( ) ;
158
159
}
159
160
160
161
fn wait_wake_bitset ( ) {
161
162
let start = Instant :: now ( ) ;
162
163
163
164
static FUTEX : i32 = 0 ;
164
165
165
- thread:: spawn ( move || {
166
+ let t = thread:: spawn ( move || {
166
167
thread:: sleep ( Duration :: from_millis ( 200 ) ) ;
167
168
unsafe {
168
169
assert_eq ! ( libc:: syscall(
@@ -202,6 +203,7 @@ fn wait_wake_bitset() {
202
203
}
203
204
204
205
assert ! ( ( 400 ..1000 ) . contains( & start. elapsed( ) . as_millis( ) ) ) ;
206
+ t. join ( ) . unwrap ( ) ;
205
207
}
206
208
207
209
fn main ( ) {
You can’t perform that action at this time.
0 commit comments