Function lockStderrWriter [src]

Allows the caller to freely write to the returned Writer, initialized with buffer, until unlockStderrWriter is called. During the lock, any std.Progress information is cleared from the terminal. The lock is recursive; the same thread may hold the lock multiple times.

Prototype

pub fn lockStderrWriter(buffer: []u8) *Writer

Parameters

buffer: []u8

Source

pub fn lockStderrWriter(buffer: []u8) *Writer { stderr_mutex.lock(); clearWrittenWithEscapeCodes() catch {}; if (is_windows) stderr_file_writer.file = .stderr(); stderr_writer.flush() catch {}; stderr_writer.buffer = buffer; return stderr_writer; }