tokio: use single thread

This commit is contained in:
Oystein Kristoffer Tveit 2024-08-07 16:45:24 +02:00
parent dadfa786ef
commit cb83942cc8
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
3 changed files with 2 additions and 13 deletions

11
Cargo.lock generated
View File

@ -991,16 +991,6 @@ dependencies = [
"libm",
]
[[package]]
name = "num_cpus"
version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
dependencies = [
"hermit-abi",
"libc",
]
[[package]]
name = "object"
version = "0.32.2"
@ -1864,7 +1854,6 @@ dependencies = [
"bytes",
"libc",
"mio",
"num_cpus",
"pin-project-lite",
"socket2",
"tokio-macros",

View File

@ -17,7 +17,7 @@ ratatui = { version = "0.26.2", optional = true }
serde = "1.0.198"
serde_json = "1.0.116"
sqlx = { version = "0.7.4", features = ["runtime-tokio", "mysql", "tls-rustls"] }
tokio = { version = "1.37.0", features = ["rt-multi-thread", "macros"] }
tokio = { version = "1.37.0", features = ["rt", "macros"] }
toml = "0.8.12"
[features]

View File

@ -44,7 +44,7 @@ enum Command {
User(cli::user_command::UserCommand),
}
#[tokio::main]
#[tokio::main(flavor = "current_thread")]
async fn main() -> anyhow::Result<()> {
env_logger::init();