diff options
author | François Laignel <fengalin@free.fr> | 2022-09-03 18:51:30 +0300 |
---|---|---|
committer | Sebastian Dröge <slomo@coaxion.net> | 2022-09-13 10:29:50 +0300 |
commit | af12bce141f5f3ec03e0128ef34a203fa7df9691 (patch) | |
tree | 0182c0c20a5716be79179eee9669aa7c11a188d4 /generic/threadshare/src/runtime/executor/scheduler.rs | |
parent | 61c62ee1e85d48578a11e4e84366885fcd0fe4ac (diff) |
ts/executor: clear the reactor instead of closing it...
... so that it can be reused on current thread for subsequent
Scheduler instantiations (e.g. block_on) without the need to
reallocate internal data structures.
Diffstat (limited to 'generic/threadshare/src/runtime/executor/scheduler.rs')
-rw-r--r-- | generic/threadshare/src/runtime/executor/scheduler.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/threadshare/src/runtime/executor/scheduler.rs b/generic/threadshare/src/runtime/executor/scheduler.rs index 9f862a66..ba4d6fa6 100644 --- a/generic/threadshare/src/runtime/executor/scheduler.rs +++ b/generic/threadshare/src/runtime/executor/scheduler.rs @@ -242,7 +242,7 @@ impl Scheduler { context_name, ); - Reactor::close(); + Reactor::clear(); let _ = CURRENT_SCHEDULER.try_with(|cur_scheduler| { *cur_scheduler.borrow_mut() = None; |