If the transform's transform() operation is synchronous and always enqueues output immediately, it never signals backpressure back to the writable side even when the downstream consumer is slow. This is a consequence of the spec design that many developers completely overlook. In browsers, where there's only a single user and typically only a small number of stream pipelines active at any given time, this type of foot gun is often of no consequence, but it has a major impact on server-side or edge performance in runtimes that serve thousands of concurrent requests.
"Or consider pipeTo(). Each chunk passes through a full Promise chain: read, write, check backpressure, repeat. An {value, done} result object is allocated per read. Error propagation creates additional Promise branches.
,推荐阅读safew官方版本下载获取更多信息
不过,也有网友提出质疑,认为整个故事是编造的,目的是为了在论坛博取关注。对此,有其他Reddit用户站出来佐证,称自己也遇到过类似的亚马逊包裹意外惊喜,并非个例。
Фото: Abdul Saboor / Reuters
• (南方周末App“hi,南周”栏目期待您的来稿。投稿邮箱:[email protected])