Skip to content

go: restore resource/stream/future handles on incomplete writes #1458

@dicej

Description

@dicej

When a stream or future payload type includes (directly or indirectly) resource, stream, or future handles, writing such payloads involves lowering those handles into the canonical ABI representation with the intention of transferring ownership to the reader. That requires "taking" the handles from the Go object(s) being written, preventing those objects from being used after the write completes.

However, if the write is incomplete (e.g. because the reader only read a subset or dropped its end before reading anything), a subset of those handles must be returned to the objects from which they were taken. That allows the objects to be used again. Currently, the Go binding generator doesn't do this, so we (read: I) need to fix this.

Metadata

Metadata

Assignees

Labels

gen-goRelated to the Go code generator

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions