File tree 3 files changed +12
-7
lines changed
3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: fcdb313bd5a37ee36247cc608d01387c7456657a
2
+ refs/heads/master: 07771ec25bc394a4a053252a2b5441f3160a0568
Original file line number Diff line number Diff line change @@ -191,14 +191,20 @@ void task_start_wrapper(spawn_args *a)
191
191
task->free (env);
192
192
}
193
193
194
+ task->die ();
195
+
196
+ if (task->killed && !failed) {
197
+ LOG (task, task, " Task killed during termination" );
198
+ failed = true ;
199
+ }
200
+
194
201
if (failed) {
195
202
#ifndef __WIN32__
196
203
task->conclude_failure ();
197
204
#else
198
205
A (task->sched , false , " Shouldn't happen" );
199
206
#endif
200
207
} else {
201
- task->die ();
202
208
task->lock .lock ();
203
209
task->notify_tasks_waiting_to_join ();
204
210
task->lock .unlock ();
@@ -316,13 +322,13 @@ rust_task::fail() {
316
322
#ifndef __WIN32__
317
323
throw this ;
318
324
#else
325
+ die ();
319
326
conclude_failure ();
320
327
#endif
321
328
}
322
329
323
330
void
324
331
rust_task::conclude_failure () {
325
- die ();
326
332
// Unblock the task so it can unwind.
327
333
unblock ();
328
334
fail_parent ();
Original file line number Diff line number Diff line change 1
- // xfail-test
1
+ // xfail-win32
2
2
// error-pattern:explicit
3
3
use std;
4
4
import std:: task;
5
5
6
6
// We don't want to see any invalid reads
7
7
fn main ( ) {
8
- fn f ( ) {
8
+ fn f ( & & _i : ( ) ) {
9
9
fail;
10
10
}
11
- let g = f;
12
- task:: spawn ( g) ;
11
+ task:: spawn ( ( ) , f) ;
13
12
}
You can’t perform that action at this time.
0 commit comments