Simpler tokio runtime; 3 threads and no io driver

This commit is contained in:
itsjunetime
2026-03-05 11:57:18 -06:00
parent 59c0e2338b
commit a4c04c71b6
2 changed files with 14 additions and 5 deletions
+2
View File
@@ -1,6 +1,8 @@
# Unreleased # Unreleased
- Added windows support! (thank you to [@jarjk](https://github.com/jarjk) for helping out!)
- Added keybindings (`0`/`$`) to scroll to left or right side of zoomed-in image ([#131](https://github.com/itsjunetime/tdf/pull/131), thank you [@IshDeshpa](https://github.com/IshDeshpa)!) - Added keybindings (`0`/`$`) to scroll to left or right side of zoomed-in image ([#131](https://github.com/itsjunetime/tdf/pull/131), thank you [@IshDeshpa](https://github.com/IshDeshpa)!)
- (Internal) decreased runtime footprint of tokio runtime
# v0.5.0 # v0.5.0
+9 -2
View File
@@ -70,11 +70,18 @@ fn reset_term() {
); );
} }
#[tokio::main] fn main() -> Result<(), WrappedErr> {
async fn main() -> Result<(), WrappedErr> { let rt = tokio::runtime::Builder::new_multi_thread()
.worker_threads(3)
.enable_time()
.build()
.unwrap();
rt.block_on(async move {
let result = inner_main().await; let result = inner_main().await;
reset_term(); reset_term();
result result
})
} }
async fn inner_main() -> Result<(), WrappedErr> { async fn inner_main() -> Result<(), WrappedErr> {