julia
ffc96bc7 - Ensure read/readavailable for BufferStream are threadsafe (#57211)

Commit
1 year ago
Ensure read/readavailable for BufferStream are threadsafe (#57211) It looks like these methods were just missed while overloading for BufferStream. There's also `readbytes!` where the current implementation will fallback to the `LibuvStream` implementation that is currently not threadsafe. What's the best approach there since the implementation is quite a bit more involved? Just duplicate the code but for BufferStream? Should we take the BufferStream lock and invoke the LibuvStream method? Open to ideas there. Also open to suggestions for having tests here? Not easy to simulate the data race of writing and calling readavailable. The fix here will unblock https://github.com/JuliaWeb/HTTP.jl/pull/1213 (I'll probably do some compat shim there until this is fully released). Thanks to @oscardssmith for rubber ducking this issue with me. Probably most helpfully reviewed by @vtjnash. --------- Co-authored-by: Jameson Nash <vtjnash@gmail.com>
Author
Parents
Loading