mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 13:00:37 +00:00
Clean up interrupt listener
This commit is contained in:
parent
888f00dd8b
commit
30dc027e3e
1 changed files with 3 additions and 5 deletions
|
@ -66,13 +66,11 @@ impl<'lua, 'fut> Scheduler<'lua, 'fut> {
|
||||||
let state = this.state.clone();
|
let state = this.state.clone();
|
||||||
lua.set_interrupt(move |_| {
|
lua.set_interrupt(move |_| {
|
||||||
if let Some(id) = state.get_current_thread_id() {
|
if let Some(id) = state.get_current_thread_id() {
|
||||||
match state.get_thread_error(id) {
|
if let Some(err) = state.get_thread_error(id) {
|
||||||
Some(e) => Err(e),
|
return Err(err);
|
||||||
None => Ok(LuaVmState::Continue),
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
Ok(LuaVmState::Continue)
|
Ok(LuaVmState::Continue)
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
this
|
this
|
||||||
|
|
Loading…
Reference in a new issue