Fix task lib sending too many messages

This commit is contained in:
Filip Tibell 2023-01-23 13:54:34 -05:00
parent fd8a41759c
commit 547d8f25f3
No known key found for this signature in database

View file

@ -84,10 +84,6 @@ async fn task_defer<'a>(task_lua: &'a Lua, tof: LuaValue<'a>) -> LuaResult<LuaTh
.await
})
.detach();
sender
.send(LuneMessage::Finished)
.await
.map_err(LuaError::external)?;
Ok(thread_to_return)
}
@ -137,10 +133,6 @@ async fn task_delay<'a>(
.await
})
.detach();
sender
.send(LuneMessage::Finished)
.await
.map_err(LuaError::external)?;
Ok(thread_to_return)
}
@ -187,10 +179,6 @@ async fn task_spawn<'a>(task_lua: &'a Lua, tof: LuaValue<'a>) -> LuaResult<LuaTh
.await
})
.detach();
sender
.send(LuneMessage::Finished)
.await
.map_err(LuaError::external)?;
Ok(thread_to_return)
}