mirror of
https://github.com/mailscope/kumomta.git
synced 2026-09-10 12:32:13 +00:00
kumo.spawn_task: move away from LocalSet
This is lingering from the past; we don't need LocalSet any more. I thought this might be causing some scheduling issues, but it was neutral overall, so this commit is really just a code cleanup.
This commit is contained in:
@@ -7,7 +7,6 @@ use mlua::{Function, Lua, LuaSerdeExt, Value, Variadic};
|
||||
use mod_redis::RedisConnKey;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::sync::atomic::AtomicUsize;
|
||||
use tokio::task::LocalSet;
|
||||
|
||||
pub mod config_handle;
|
||||
pub mod diagnostic_logging;
|
||||
@@ -448,11 +447,9 @@ pub fn register(lua: &Lua) -> anyhow::Result<()> {
|
||||
.on_thread_park(kumo_server_memory::purge_thread_cache)
|
||||
.build()
|
||||
.unwrap();
|
||||
let local_set = LocalSet::new();
|
||||
let event_name = params.event_name.clone();
|
||||
|
||||
let result =
|
||||
local_set.block_on(&runtime, async move { params.run().await });
|
||||
let result = runtime.block_on(async move { params.run().await });
|
||||
if let Err(err) = result {
|
||||
tracing::error!("Error while dispatching {event_name}: {err:#}");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user