-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
This function seems a bit odd to define here:
Lines 12 to 21 in 6bfc114
| function Base.skip(io::Union{Base.Process, Base.ProcessChain}, n::Integer) | |
| n < 0 && throw(ArgumentError("cannot skip backwards when reading from a process")) | |
| isempty(skip_buffer) && resize!(skip_buffer, DEFAULT_BUFFER_SIZE) | |
| while n > 0 | |
| n -= readbytes!(io, skip_buffer, min(n, length(skip_buffer))) | |
| end | |
| # TODO: our skip data should throw if there's not enough data | |
| return io | |
| end | |
| const skip_buffer = UInt8[] |
It also has some issues, like referencing a global skip_buffer (so the function is not thread-safe).
Metadata
Metadata
Assignees
Labels
No labels