about summary refs log tree commit diff
path: root/src/rt/rust_task.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rt/rust_task.cpp')
-rw-r--r--src/rt/rust_task.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp
index ad2e8a71ae5..58a0e3eae6c 100644
--- a/src/rt/rust_task.cpp
+++ b/src/rt/rust_task.cpp
@@ -678,11 +678,11 @@ MUST_CHECK bool rust_task::wait_event(void **result) {
 
 void
 rust_task::signal_event(void *event) {
-    scoped_lock with(lifecycle_lock);
-
     assert(task_state_blocked == state ||
            task_state_running == state);
 
+    scoped_lock with(lifecycle_lock);
+
     this->event = event;
     event_reject = true;
     if(task_state_blocked == state) {