wit-bindgen icon indicating copy to clipboard operation
wit-bindgen copied to clipboard

go: prevent concurrent reads or writes on the same stream or future

Open dicej opened this issue 3 months ago • 1 comments

There's currently nothing in the code generated for Go to prevent the programmer from issuing multiple concurrent reads or writes on the same stream or future, which is currently disallowed by the component model spec and will lead to a trap. We should handle this more gracefully by returning an idiomatic error from {Stream,Future}Writer.Write and {Stream,Future}Reader.Read (or else a panic if we feel this is a programmer error rather than a runtime error).

dicej avatar Dec 08 '25 17:12 dicej

@dicej Will you assign this to me, please?

asteurer avatar Dec 09 '25 21:12 asteurer