mirror of
https://github.com/lune-org/lune.git
synced 2025-01-06 11:29:11 +00:00
Dont try to resume dead threads in the scheduler
This commit is contained in:
parent
0757d6f293
commit
e4cf40789c
1 changed files with 6 additions and 0 deletions
|
@ -34,6 +34,12 @@ where
|
||||||
let thread_id = thread.id();
|
let thread_id = thread.id();
|
||||||
let (thread, args) = thread.into_inner(self.lua);
|
let (thread, args) = thread.into_inner(self.lua);
|
||||||
|
|
||||||
|
// Make sure this thread is still resumable, it might have
|
||||||
|
// been resumed somewhere else or even have been cancelled
|
||||||
|
if thread.status() != LuaThreadStatus::Resumable {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Resume the thread, ensuring that the schedulers
|
// Resume the thread, ensuring that the schedulers
|
||||||
// current thread id is set correctly for error catching
|
// current thread id is set correctly for error catching
|
||||||
self.state.set_current_thread_id(Some(thread_id));
|
self.state.set_current_thread_id(Some(thread_id));
|
||||||
|
|
Loading…
Reference in a new issue