denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
97.81k stars 5.38k forks source link

Make `Deno.readDir` actually streaming #4218

Open ry opened 4 years ago

ry commented 4 years ago

probably with async iterator

lucacasonato commented 4 years ago

This is implemented: https://doc.deno.land/builtin/stable#Deno.readDir

lucacasonato commented 4 years ago

Actually while the public interface is async streaming, it is internally still non-streaming. Reopening

caspervonb commented 4 years ago

For context, in the implementation we are collecting the iterator into an array and dispatching it via JSON to the JS call site. Works but semantically not very sound.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

cjihrig commented 2 years ago

For reference, here is how this is implemented in Node: