summaryrefslogtreecommitdiff
path: root/src/thread
diff options
context:
space:
mode:
authorluwenpeng <[email protected]>2023-09-18 14:47:10 +0800
committerluwenpeng <[email protected]>2023-09-18 17:52:39 +0800
commitcb674f9e168b6e709136e17a5bc87d3925c6f479 (patch)
treea735d755c1b653ae59b0b47d05ed720aa573f0b6 /src/thread
parent9387c343d38c00efb432cfb419a3c669f4d65b3a (diff)
[refactor] Event manager: Support triggering new events in event handle, Solve the problem of multiple borrowing
Diffstat (limited to 'src/thread')
-rw-r--r--src/thread/thread.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/thread/thread.rs b/src/thread/thread.rs
index d13c271..75e7ab6 100644
--- a/src/thread/thread.rs
+++ b/src/thread/thread.rs
@@ -9,9 +9,9 @@ pub struct ThreadContex {
}
impl ThreadContex {
- pub fn new() -> Self {
+ pub fn new(event_mgr: Rc<RefCell<EventManager>>) -> Self {
ThreadContex {
- event_mgr: Rc::new(RefCell::new(EventManager::new())),
+ event_mgr,
session_mgr: Rc::new(RefCell::new(SessionManager::new(4096))),
}
}