소스 검색

feat: add a method to access the scheduler

Ilya Maximov 3 년 전
부모
커밋
ff3d772756
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      packages/core/src/scopes.rs

+ 5 - 0
packages/core/src/scopes.rs

@@ -579,6 +579,11 @@ impl ScopeState {
         self.our_arena_idx
     }
 
+    /// Get a handle to the raw update scheduler channel
+    pub fn scheduler_channel(&self) -> UnboundedSender<SchedulerMsg> {
+        self.tasks.sender.clone()
+    }
+
     /// Create a subscription that schedules a future render for the reference component
     ///
     /// ## Notice: you should prefer using prepare_update and get_scope_id