I found the problem. Rust schedules task in the same thread. If I stop the thread (the recv call sleep I think), every task stop. So I read the doc and I see the spawn_sched method that start a new scheluder in a new thread.

I replace the do spawn with do std::task::spawn_sched(std::task::SingleThreaded) and now it work.

Philippe Delrieu


_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to