Stream: git-wasmtime

Topic: wasmtime / issue #6740 Preview2 to Preview1 adapter hide ...


view this post on Zulip Wasmtime GitHub notifications bot (Jul 17 2023 at 20:59):

guybedford opened issue #6740:

Feature

Change the adapter implementation to always ensure that blocking_read returning a done value of true will not call blocking_read again requiring an unnecessary empty vec, as this function call is effectively redundant.

Benefit

It removes redundancy in the read calls.

Implementation

Not sure, would be good to weigh up that it doesn't complicate the implementation.

Alternatives

It's fine to leave as-is for now, so this is certainly non-urgent, but it could also be nice to implement non-redundancy.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 19 2023 at 19:59):

jameysharp commented on issue #6740:

This sounds like the kind of thing which either is surprisingly complicated or would be a nice candidate for the "good first issue" tag. I'd love it if somebody could take enough of a look to decide which of those it is, and if it's the latter, leave a few hints here in case somebody out there wants a project to work on.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 19 2023 at 20:18):

sunfishcode commented on issue #6740:

I think the most straightforward way to do this would be to add a at_end flag to the Streams struct, set it when blocking_read indicates the end is reached, and check it before calling blocking_read. And clear it in fd_seek at the same time it does stream.input.set(None).


Last updated: Dec 23 2024 at 12:05 UTC