I'm a Rust noob and I need help :) I wrote some code using Tokio but it doesn't seem to want to run across more than one thread. The runtime does spawn $NCPU threads but only one is ever actively used. Could you help me figure out why? :/

github.com/delroth/grep-nixos-

Follow

@delroth

gist.github.com/joseluisq/e7f9 might be helpful (tl;dr awaiting the future just executes it on the same thread; you need to spawn a task with tokio to get any parallelism)

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.