Baunsgaard commented on code in PR #2019:
URL: https://github.com/apache/systemds/pull/2019#discussion_r1567400551
##########
src/main/java/org/apache/sysds/runtime/util/DoubleBufferingOutputStream.java:
##########
@@ -75,6 +75,9 @@ public void write(byte[] b, int off, int len) throws
IOException {
// To avoid this we simply write the
given byte array without a buffer.
// This approach only works if the
caller adhere to not modify the byte array given
_locks[_pos] = _pool.submit(() ->
writeBuffer(b, off, len));
+ // get the task to reduce the risk (
and at least block the current thread)
Review Comment:
This fixes the issue at least for one thread caller.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]