Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
19 views

I am facing an issue where my Actix-web server starts correctly, but the moment I hit the /upload_chunk endpoint from my frontend, the request hangs forever. After some debugging, I found that the ...
forstudy's user avatar
Advice
0 votes
1 replies
71 views

I have two questions about thread lifetime in Tokio Runtime. Based on Tokio documentation While the Runtime is active, threads may shut down after periods of being idle. It means (it is my ...
MateuszGierczak's user avatar
6 votes
1 answer
153 views

I have a rust program where: I only use one thread to run my entire application. #[tokio::main(flavor = "current_thread")]. I never spawn new threads only via tokio. I hold all my models ...
Tono Nam's user avatar
  • 36.4k
0 votes
1 answer
80 views

I'm trying to spawn multiple parallel (not concurrent) tasks. Every task is running a PUT operation to a custom S3 storage using AWS SDK for Rust. The function body looks the following (the different ...
lukeflo's user avatar
  • 185
2 votes
2 answers
100 views

Since tokio::select! runs all branches concurrently but not in parallel, why doesn't Rust allow branches to share the same mutable reference ? Is there a way to solve this problem ? Example of code ...
RRRR's user avatar
  • 41
3 votes
1 answer
114 views

I have the following code where I start an Actix Web server and a queue handler task. When I press Ctrl+C, I want both the HTTP server and the queue handler to shut down gracefully. Currently, the ...
Gustavo Mantovani's user avatar
1 vote
1 answer
54 views

I am writing a static file server with hyper 1.0 and tokio 1.0. When serving a file, I want it to be as fast as possible while allocating the minimum required amount of memory. In other words: I want ...
Lukas Kalbertodt's user avatar
0 votes
2 answers
122 views

Setup I'm playing with tonic helloworld tutorial. The only changes I made is that in say_hello, just before returning the reply, I added: std::thread::sleep(std::time::Duration::from_millis(10000)); ...
Colin Pitrat's user avatar
  • 2,102
0 votes
1 answer
104 views

I have a web server with Axum, and when I receive a call to, let's say my endpoint start, I want to start a process that can be stopped by calling a second endpoint stop. If I call a second time the ...
Manuelarte's user avatar
  • 1,904
0 votes
1 answer
64 views

I am working with rust-libp2p and I'm using libp2p request_reponse, but I found out that the send_reponse method from the network behaviour doesn't actually send when the file is large(43 MB in my ...
Arnold's user avatar
  • 7
0 votes
0 answers
66 views

Consider a Webcrawler which will start of an entry point and put found links into its own queue for further processing. Sequential implementation A working sequential implementation may be like the ...
Mindxxxd's user avatar
  • 139
2 votes
2 answers
171 views

I'm building a Rust client that includes a Sender field: struct Client { tx: std::sync::mpsc::Sender<String>, some_other_stuff: i32, } To share this Client between threads, I wrapped it ...
Marvis Lu's user avatar
  • 471
0 votes
1 answer
97 views

I am working with the tokio tracing/tracing_subscriber crates building an internal toolkit and have been running into issues trying to add an option to pass a custom formatter to the layer. Using the ...
Shovel_jockey's user avatar
1 vote
2 answers
89 views

I am working on a project in which I'm using methods from a number of crates Foo1, Foo2, etc., returning objects like Result<T,Foo1Error>, Result<T,Foo2Error>, respectively, within an ...
jwimberley's user avatar
  • 1,760
-1 votes
1 answer
68 views

This is not a solution to my problem. The suggested answer replaces the values with Nones. I quite literally require the size of my vector to reduce. MRE: use tokio::sync::mpsc; #[tokio::main] async ...
kesarling's user avatar
  • 2,322
2 votes
1 answer
689 views

I would like to initialize SeaOrm database connection in sync for easier usage inside application and testing, but not sure how to do it without error. I'm fine with any type of blocking as this ...
ZiiMakc's user avatar
  • 37.7k
0 votes
1 answer
85 views

Unfortunately a project I'm working on doesn't work on some platforms. It crashes with an error like /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found /lib/x86_64-linux-gnu/libm.so.6: ...
Jury's user avatar
  • 1,337
1 vote
0 answers
73 views

I'm writing tests for a Rust program that uses the tracing crate for logging, and the test-log crate to enable logging in the tests. I have an arrange step that does quite a lot of things, which I ...
Niels Reijers's user avatar
-1 votes
1 answer
109 views

im trying to give a client application email functionality using lettre and tokio. The code itself should work, though declaring the function a tauri::command gives problems, i don't know how to solve....
Yawgmoth-Physician's user avatar
1 vote
1 answer
96 views

In the below code I'm copying a file(worker thread) and want to print the progress of the file copy operation in main thread. I would like to know, if it's possible to get the file/seek position of ...
Harry's user avatar
  • 4,132
-1 votes
2 answers
160 views

I understand the problem with this code, but I don't know what would be the right way to fix it: use tokio::fs::read_dir; use hyper::{Body, Response, Result}; async fn list_dir() -> Result<...
wvxvw's user avatar
  • 9,703
0 votes
0 answers
36 views

I’m currently learning Tokio from its official tutorial, and the following code is part of the tutorial: https://tokio.rs/tokio/tutorial/spawning use mini_redis::{Connection, Frame}; use tokio::net::{...
Marvis Lu's user avatar
  • 471
4 votes
1 answer
485 views

When using AsyncFnOnce with tokio::spawn, I get the following error: fn spawn_asyncfn<F>(f: F) -> tokio::task::JoinHandle<()> where F: 'static + AsyncFnOnce() -> (), { let ...
Finomnis's user avatar
  • 23.5k
0 votes
1 answer
224 views

I'd like to write an async function recv_some which takes a watch::Receiver<Option<T>>, waits for the value to be Some, and returns something which Deref's to T. For reasons I sort of ...
dspyz's user avatar
  • 5,604
1 vote
1 answer
263 views

As I understand it, with the multithreaded runtime a Tokio task may be moved from worker thread to worker thread during its execution via the task stealing mechanism Is there any way to tell the ...
Rob Agar's user avatar
  • 12.5k

1
2 3 4 5
26