3 ms·
Such as stdout or stderr that a log crate would be using?
by tick_tock_tick 2y ago
Such as stdout or stderr that a log crate would be using?
- dwattttt 2y agoThat's not a very clear example. You don't need to be using multiple versions of the same dependency to contend on access to stderr/out, just having a println in your code along with logging code will have the same effect. I haven't ever observed a problem of concurrent access to stdout/err though, I expect because the methods for accessing stdout/err lock them for the duration of their printing. If you Google for "Rust print console slow", you'll probably find advice to explicitly lock it, to avoid individual printlns from each acquiring the lock.