Rust how to get Ownership pass to tokio
please find below code
`writeln!(std::io::stdout().lock(), “”)` cannot be captured by cargo test
I am trying to implement a logger in my multi-threading program. So I tried using a std::io::stdout
to gain a StdoutLock to ensure atomicity. But later I found in that way, all the log write to stdout cannot be capture when cargo test
.
`writeln!(std::io::stdout().lock(), “”)` cannot be captured by cargo test
I am trying to implement a logger in my multi-threading program. So I tried using a std::io::stdout
to gain a StdoutLock to ensure atomicity. But later I found in that way, all the log write to stdout cannot be capture when cargo test
.
I get trait bounds are not satisfied error
Label model