alexcrichton requested rvolosatovs for a review on PR #11615.
alexcrichton opened PR #11615 from alexcrichton:wasip3-refactor-readdir-iterator to bytecodealliance:main:
Follow-up from https://github.com/bytecodealliance/wasmtime/pull/11515, part stylistic part tweaking behavior. Includes a test now too!
alexcrichton requested wasmtime-wasi-reviewers for a review on PR #11615.
alexcrichton requested fitzgen for a review on PR #11615.
alexcrichton requested wasmtime-core-reviewers for a review on PR #11615.
rvolosatovs created PR review comment:
In p2 this operation is performed in a separate thread (if runtime is configured to do so), so I assumed this may run for a while and avoided calling it from within
read_directory. Sinceread_directoryis not markedasync, I think the expectation is that it should return as soon as possible, hence why IMOentries()should only be called afterstream.read.Of course, if cost of calling
entriesis negligible that does not matter. Are we sure this function will not block for long?
rvolosatovs submitted PR review.
rvolosatovs created PR review comment:
// Drain `self.iter`. Successful results go into `buf`. Any errors make
rvolosatovs created PR review comment:
Is this correct? I was under impression that a stream.read can be cancelled, but that does not cancel the underlying stream itself
alexcrichton created PR review comment:
You're correct about the consequences, yeah, but this is within the
allow_blocking_current_threadblock, so the blocking is intentional. Given that I think this is the same as p2?
alexcrichton submitted PR review.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
You're right yeah, I keep confusing myself about how to handle
finish.
alexcrichton updated PR #11615.
rvolosatovs submitted PR review.
rvolosatovs created PR review comment:
I've probably only noticed this, because I've done the exact same thing :sweat_smile:
rvolosatovs submitted PR review.
rvolosatovs created PR review comment:
Yes, you're right, looks good!
rvolosatovs submitted PR review.
rvolosatovs merged PR #11615.
Last updated: Dec 06 2025 at 06:05 UTC