We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 490000c commit 44560bdCopy full SHA for 44560bd
[refs]
@@ -1,2 +1,2 @@
1
---
2
-refs/heads/master: aeadc6269ef76f4425a49d892ceac7ea311ef5c1
+refs/heads/master: 854daaec0c4cf0c236e46b45a1254c85a8b352db
trunk/src/rt/rust_kernel.cpp
@@ -150,13 +150,11 @@ rust_kernel::fail() {
150
151
rust_task_id
152
rust_kernel::create_task(rust_task *spawner, const char *name) {
153
+ scoped_lock with(_kernel_lock);
154
rust_scheduler *thread = threads[isaac_rand(&rctx) % num_threads];
155
rust_task *t = thread->create_task(spawner, name);
- {
156
- scoped_lock with(_kernel_lock);
157
- t->user.id = max_id++;
158
- task_table.put(t->user.id, t);
159
- }
+ t->user.id = max_id++;
+ task_table.put(t->user.id, t);
160
return t->user.id;
161
}
162
0 commit comments