mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-14 18:03:44 +00:00
8355608: Async UL should take the file lock of stream when outputting
Reviewed-by: aboldtch, iklam
This commit is contained in:
parent
afcaf84022
commit
7f7add1e56
@ -168,6 +168,7 @@ int LogFileStreamOutput::write_internal(const LogDecorations& decorations, const
|
||||
}
|
||||
|
||||
int LogFileStreamOutput::write_blocking(const LogDecorations& decorations, const char* msg) {
|
||||
FileLocker flocker(_stream);
|
||||
int written = write_internal(decorations, msg);
|
||||
return flush() ? written : -1;
|
||||
}
|
||||
@ -177,10 +178,7 @@ int LogFileStreamOutput::write(const LogDecorations& decorations, const char* ms
|
||||
return 0;
|
||||
}
|
||||
|
||||
FileLocker flocker(_stream);
|
||||
int written = write_internal(decorations, msg);
|
||||
|
||||
return flush() ? written : -1;
|
||||
return write_blocking(decorations, msg);
|
||||
}
|
||||
|
||||
int LogFileStreamOutput::write(LogMessageBuffer::Iterator msg_iterator) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user