Skip to content

Commit 42f62c7

Browse files
committed
---
yaml --- r: 4301 b: refs/heads/master c: 7b87fa3 h: refs/heads/master i: 4299: ef3b2d0 v: v3
1 parent a841fbe commit 42f62c7

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-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: 4837a57df50e6dcc22b4ba39ad86f291439878af
2+
refs/heads/master: 7b87fa368333130830aea07f3d01aff4b009cbaa

trunk/src/rt/rust_scheduler.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,11 @@ rust_scheduler::create_task(rust_task *spawner, const char *name) {
272272
task->pin(spawner->pinned_on);
273273
task->on_wakeup(spawner->_on_wakeup);
274274
}
275-
lock.lock();
276-
newborn_tasks.append(task);
277-
lock.unlock();
275+
276+
{
277+
scoped_lock with(lock);
278+
newborn_tasks.append(task);
279+
}
278280

279281
sync::increment(kernel->live_tasks);
280282

0 commit comments

Comments
 (0)