Stream: general

Topic: Multiple components subscribe to pollables


view this post on Zulip Mendy Berger (Oct 13 2024 at 02:42):

Consider the following scenario: we have two components, A and B. B relies on A, i.e A is a library. Both A and B wanna subscribe to pollables, A to pollables provided by the host, and B to pollables provided by A. Can they do it without blocking each other?

My understanding is that subscribing to pollables is a blocking operation. And since both A and B run on the same thread, having them both subscribe to pollables is impossible.

Am I wrong about this? Is there any way around this problem?
Also, will wasip3 solve this somehow?

view this post on Zulip Joel Dice (Oct 13 2024 at 02:58):

Correct -- the only way to compose concurrent components in WASIp2 is for them to coordinate by having one call poll with pollables from both of them (i.e. one would have to pass its pollables to the other). This is extremely awkward and not practical in general, which is why WASIp3 will instead use the new async ABI as the basis for concurrency, making async composition as easy as sync composition.

Repository for design and specification of the Component Model - WebAssembly/component-model

view this post on Zulip Joel Dice (Oct 13 2024 at 03:00):

See also Luke Wagner's async presentation videos and https://github.com/dicej/rfcs/blob/component-async/accepted/component-model-async.md#motivation

RFC process for Bytecode Alliance projects. Contribute to dicej/rfcs development by creating an account on GitHub.

view this post on Zulip Mendy Berger (Oct 13 2024 at 03:03):

Thanks for clarifying this @Joel Dice!


Last updated: Oct 23 2024 at 20:03 UTC