Skip to content

Commit

Permalink
Fix a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
temeddix committed May 20, 2024
1 parent f7b60c4 commit 4e3b0c2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions rust_crate/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,7 @@ macro_rules! write_interface {
let os_cell =
TOKIO_RUNTIME.get_or_init(|| ThreadLocal::new(|| RefCell::new(None)));
os_cell.with(move |cell| {
// If there was already a tokio runtime previously,
// most likely due to Dart's hot restart,
// its tasks as well as itself will be terminated,
// being replaced with the new one.
// Dropping the tokio runtime causes it to shut down.
cell.take();
});
});
Expand Down

0 comments on commit 4e3b0c2

Please sign in to comment.