Skip to content

Commit a32d923

Browse files
committed
---
yaml --- r: 22642 b: refs/heads/master c: 18c645a h: refs/heads/master v: v3
1 parent 84c0748 commit a32d923

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 5bb4a12900969b3250c490a5e0682c658fe65ba8
2+
refs/heads/master: 18c645a8839dd86d7f353d0fe98eaf27e246a525
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be

trunk/src/rt/rust_sched_loop.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,18 +68,23 @@ rust_sched_loop::kill_all_tasks() {
6868
killed = true;
6969

7070
for (size_t i = 0; i < running_tasks.length(); i++) {
71-
all_tasks.push_back(running_tasks[i]);
71+
rust_task *t = running_tasks[i];
72+
t->ref();
73+
all_tasks.push_back(t);
7274
}
7375

7476
for (size_t i = 0; i < blocked_tasks.length(); i++) {
75-
all_tasks.push_back(blocked_tasks[i]);
77+
rust_task *t = blocked_tasks[i];
78+
t->ref();
79+
all_tasks.push_back(t);
7680
}
7781
}
7882

7983
while (!all_tasks.empty()) {
8084
rust_task *task = all_tasks.back();
8185
all_tasks.pop_back();
8286
task->kill();
87+
task->deref();
8388
}
8489
}
8590

0 commit comments

Comments
 (0)