Skip to content

CABI: refactor/simplify stream/future logic; fix delivery of DROPPED - #719

Open
lukewagner wants to merge 1 commit into
mainfrom
more-simplify
Open

CABI: refactor/simplify stream/future logic; fix delivery of DROPPED#719
lukewagner wants to merge 1 commit into
mainfrom
more-simplify

Conversation

@lukewagner

Copy link
Copy Markdown
Member

This PR factors out the first commit of #717, since it's pretty nice on its own and can be merged earlier since it's just behavior-preserving refactoring, except for fixing a spec bug (where DROPPED wasn't being delivered promptly even though the other side had dropped) that now matches wasmtime.

The PR is able to remove 125 lines (!) from definitions.py by merging future+stream and read+write definitions that were formerly separate. The key simplification was removing the intermediate shared object that both the readable/writable ends point to. Previously, this shared object seemed necessary to serve as the host/guest abstract interface, but as this PR shows, a better alternative is to instead say that the host owns and uses a readable/writable end directly (as if it was a component with its own handles table), and thus the two ends can just point to each other directly with no intermediate object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant