mirror of
https://github.com/girlbossceo/conduwuit.git
synced 2025-03-14 18:55:37 +00:00
set dbpool thread name (gated by tokio_unstable)
Signed-off-by: Jason Volk <jason@zemos.net> Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
f78104a959
commit
5f7636f177
2 changed files with 9 additions and 0 deletions
|
@ -242,6 +242,7 @@ features = [
|
|||
"time",
|
||||
"rt-multi-thread",
|
||||
"io-util",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[workspace.dependencies.tokio-metrics]
|
||||
|
|
|
@ -122,8 +122,16 @@ async fn spawn_until(self: &Arc<Self>, recv: Receiver<Cmd>, max: usize) -> Resul
|
|||
fn spawn_one(self: &Arc<Self>, workers: &mut JoinSet<()>, recv: Receiver<Cmd>) -> Result {
|
||||
let id = workers.len();
|
||||
let self_ = self.clone();
|
||||
|
||||
#[cfg(not(tokio_unstable))]
|
||||
let _abort = workers.spawn_blocking_on(move || self_.worker(id, recv), self.server.runtime());
|
||||
|
||||
#[cfg(tokio_unstable)]
|
||||
let _abort = workers
|
||||
.build_task()
|
||||
.name("conduwuit:dbpool")
|
||||
.spawn_blocking_on(move || self_.worker(id, recv), self.server.runtime());
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue