1 use std::io::{self, stderr, stdout, StderrLock, StdoutLock, Write};
3 use crate::utils::logger;
5 type StdioOutputLocks = (StdoutLock<'static>, StderrLock<'static>);
7 pub fn lock_and_flush_output_stdio() -> io::Result<StdioOutputLocks> {
8 logger::flush_messages();
10 let mut stdout = stdout().lock();
12 let mut stderr = stderr().lock();