You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The spec for Base.read(::IO, ::Int) says: "[By default] this function will block repeatedly trying to read all requested bytes, until an error or end-of-file occurs."
For Base.BufferStream and Base.TCPSocket, read() behaves as specified and blocks to wait ffor more data (see JuliaLang/julia#24526).
The current implementation of Base.read(::FIFOBuffer) is just an alias for readavailable:
Sorry, typo, the doc I referenced is for Base.read(:: IOStream, ::Int).
It seems to me that if FIFOBuffer is intended to be a stream for communicating between tasks, it should follow the pattern set for this by Base. i.e. follow the doc for Base.read(:: IOStream, ::Int) and the behaviour of BufferStream.
The spec for
Base.read(::IO, ::Int)
says: "[By default] this function will block repeatedly trying to read all requested bytes, until an error or end-of-file occurs."For
Base.BufferStream
andBase.TCPSocket
,read()
behaves as specified and blocks to wait ffor more data (see JuliaLang/julia#24526).The current implementation of
Base.read(::FIFOBuffer)
is just an alias forreadavailable
:HTTP.jl/src/fifobuffer.jl
Line 89 in 8a48266
readavailable
blocks only when the buffer is empty, not until end of file asread
should do.Context of the discovery of this issue: #110
The text was updated successfully, but these errors were encountered: