top | item 46133280

(no title)

thinkharderdev | 2 months ago

Honestly I don't see how that is different than how it works in Rust. Synchronous code is a proper subset of asynchronous code. If you have a streaming API then you can have an implementation that works in a synchronous way with no overhead if you want. For example, if you already have the whole buffer in memory sometimes then you can just use it and the stream will work exactly like a loop that you would write in the sync version.

discuss

order

conradev|2 months ago

serde is a pull parser and it would take significant modification to convert it into an incremental push parser without blocking a thread.