Skip to content

Commit d7d1b7f

Browse files
committed
---
yaml --- r: 6399 b: refs/heads/master c: 3cfcdb4 h: refs/heads/master i: 6397: 370a76f 6395: 6ba7cfb 6391: ca058f1 6383: 44dca5d 6367: e3951ef 6335: a22593e 6271: 456add4 6143: 6a8ba95 v: v3
1 parent db85fba commit d7d1b7f

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 57b43b53f9c673545b25338eefa7f3c620d85aa4
2+
refs/heads/master: 3cfcdb4bb279bab6f58b147486f5e2a54411b316

trunk/src/rt/rust_task.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ void task_start_wrapper(spawn_args *a)
213213
} else {
214214
task->lock.lock();
215215
task->lock.unlock();
216-
task->yield(1);
217216
}
217+
task->ctx.next->swap(task->ctx);
218218
}
219219

220220
void
@@ -274,7 +274,7 @@ rust_task::yield(size_t time_in_us) {
274274
LOG(this, task, "task %s @0x%" PRIxPTR " yielding for %d us",
275275
name, this, time_in_us);
276276

277-
if (killed && !dead()) {
277+
if (killed) {
278278
// Receive may have blocked before yielding
279279
unblock();
280280
fail();
@@ -333,7 +333,6 @@ void
333333
rust_task::conclude_failure() {
334334
fail_parent();
335335
failed = true;
336-
yield(4);
337336
}
338337

339338
void

0 commit comments

Comments
 (0)