Remix.run Logo
notnullorvoid 6 hours ago

There's a lot I like about this API, mainly the pull-based iterator approach. I don't really see what the value of the sync APIs are though. What's the difference of just using iterators directly for sync streams?

jonkoops 6 hours ago | parent [-]

It avoids the overhead of Promises, so I can imagine that this would be quite useful if you know that blocking the thread is fine for a little while (e.g. in a worker).

notnullorvoid 5 hours ago | parent [-]

I mean the APIs like `Stream.pullSync` you could do that with a regular (non-async) iterator/generator.