std.json.Value: added dumpStream(), utilize WriteStream for dump()
This commit is contained in:
committed by
Andrew Kelley
parent
ac6f0d245d
commit
f81f36e2ff
@@ -45,6 +45,7 @@ var stderr_file_out_stream: File.OutStream = undefined;
|
||||
|
||||
var stderr_stream: ?*io.OutStream(File.WriteError) = null;
|
||||
var stderr_mutex = std.Mutex.init();
|
||||
|
||||
pub fn warn(comptime fmt: []const u8, args: ...) void {
|
||||
const held = stderr_mutex.acquire();
|
||||
defer held.release();
|
||||
@@ -64,6 +65,10 @@ pub fn getStderrStream() !*io.OutStream(File.WriteError) {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn getStderrMutex() *std.Mutex {
|
||||
return &stderr_mutex;
|
||||
}
|
||||
|
||||
/// TODO multithreaded awareness
|
||||
var self_debug_info: ?DebugInfo = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user