mirror of
https://github.com/lune-org/mlua-luau-scheduler.git
synced 2025-04-10 21:40:55 +01:00
Remove lua app data executor ref when done
This commit is contained in:
parent
bab29a5cbf
commit
fe4563b4f8
1 changed files with 4 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
use std::sync::Arc;
|
use std::sync::{Arc, Weak};
|
||||||
|
|
||||||
use mlua::prelude::*;
|
use mlua::prelude::*;
|
||||||
use smol::prelude::*;
|
use smol::prelude::*;
|
||||||
|
@ -218,6 +218,9 @@ impl<'lua> Runtime<'lua> {
|
||||||
};
|
};
|
||||||
|
|
||||||
main_exec.run(fut).await;
|
main_exec.run(fut).await;
|
||||||
|
|
||||||
|
// Make sure we don't leave any references behind
|
||||||
|
self.lua.remove_app_data::<Weak<Executor>>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue