document on how to use with tokio runtime
Closed this issue · 2 comments
ibotty commented
Am I supposed to use
block_on(async {
let mut entries = WalkDir::entries("some/path");
...
});
even in a async fn
that is run by tokio's multithreaded runtime? AFAIU that will setup a separate runtime to run the future.
ririsoft commented
Hello @ibotty ,
If you already have an async runtime running you can safely use Walkdir
, without running another runtime.
This is the whole purpose of this crate.
Does it answer the question ?
ibotty commented
Hmm. You are totally right, it works in my toy example. I'll figure out, what the problem was in my bigger app.