Repository navigation
v0.21.0
Changed
erlang/par.map_*,each_*,merge,race, theerlang/timecombinators anderlang/source.timeoutnow re-raise a panic from the mapped function or an upstream in the process that runs the stream, after closing the upstreams and stopping the other workers. They used to end the stream early without saying so, or wait forever.timeoutnow reports an upstream panic as a panic, not asError(Nil).binary.length_prefixedends the stream afterFrameTooLargeand closes the upstream, because the framing cannot be recovered. It used to read the rest of the oversized payload as new frames.binary.delimited(on: <<>>)panics. It used to emit empty frames forever.erlang/par.merge,race, theerlang/timecombinators andtimeoutstart their workers on the first pull, so building a stream runs nothing and a stream can be run more than once.racekeeps pulling the winner inside its worker.stream.broadcastandstream.unzipconsumers pulled from another process than the one that built them panic with a message that says so. They used to yieldError(Nil)or crash the worker.
Fixed
stream.bufferno longer pulls or closes an upstream again after it returnedDone.stream.flat_map,stream.group_adjacent,text.linesandbinary.length_prefixedno longer overflow the JavaScript stack on long inputs.text.linesis linear on JavaScript; a 400 KB chunk took 36 seconds.binary.fixed_size,length_prefixed,delimited,text.splitandtext.utf8_decodebuild frames in linear time when data arrives in many small chunks.stream.broadcast,broadcast_bounded,unzipandstream.bufferkeep their queues in linear time, andbroadcastandunzipfree their state once every consumer is done.erlang/par.map_*no longer take the caller's ownDOWNmessages, no longer hang when one worker crashes next to a fast result, and no longer leave results from an earlier run in the mailbox.erlang/par.map_*andeach_*stop their running workers when the process running the stream exits.erlang/source.timeoutpulls every element in one worker, so resources owned by that process survive between elements, and closes the upstream when the deadline passes.- The
erlang/timecombinators send one element per request instead of filling the caller's mailbox. datastream/erlang/internal/pumpis no longer published as a documented module.- The documentation now says that a negative count in
takeanddropis treated as 0.
Install
gleam add datastreamSee HexDocs for the API
reference.