Skip to content

Commit f5df28b

Browse files
committed
---
yaml --- r: 15245 b: refs/heads/try c: 9851a90 h: refs/heads/master i: 15243: 5cce8ea v: v3
1 parent bd5abcf commit f5df28b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: 8aee42a382eff8fc35d1341be5b307da87a25603
5+
refs/heads/try: 9851a906a59faee4ca13a8cf76677287793809a2
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/rt/rust_scheduler.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ rust_scheduler::rust_scheduler(rust_kernel *kernel,
1111
live_threads(num_threads),
1212
live_tasks(0),
1313
num_threads(num_threads),
14+
cur_thread(0),
1415
id(id)
1516
{
1617
create_task_threads();
@@ -87,9 +88,9 @@ rust_scheduler::create_task(rust_task *spawner, const char *name) {
8788
{
8889
scoped_lock with(lock);
8990
live_tasks++;
90-
if (++cur_thread >= num_threads)
91+
thread_no = cur_thread++;
92+
if (cur_thread >= num_threads)
9193
cur_thread = 0;
92-
thread_no = cur_thread;
9394
}
9495
rust_task_thread *thread = threads[thread_no];
9596
return thread->create_task(spawner, name);

0 commit comments

Comments
 (0)