<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 5 June 2017 at 20:40, Michael Meeks <span dir="ltr"><<a href="mailto:michael.meeks@collabora.com" target="_blank">michael.meeks@collabora.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br> Sooo ... I think your code is golden; but we're going to need to fix<br>
the package/ code to avoid the bug.<br>
<br>
<a href="https://bugs.documentfoundation.org/show_bug.cgi?id=97597#c28" rel="noreferrer" target="_blank">https://bugs.<wbr>documentfoundation.org/show_<wbr>bug.cgi?id=97597#c28</a><br>
<br>
Suggests (input from Kohei appreciated) - that we may need to do a new<br>
'seek' each time we come to reading some bytes from the underlying<br>
package/ stream - to ensure that no other thread is messing with our<br>
underlying stream position while we are reading compressed data from it =)<br>
<br></blockquote><div><br></div><div>Perhaps we need a new file abstraction which deliberately has no seek position in it's API, forcing client code to always specify a position when doing read()/write()?</div><div>Then when we pass such a handle/object between threads, its use will be correct by construction.</div><div> </div></div></div></div>