component-model icon indicating copy to clipboard operation
component-model copied to clipboard

async: Is it possible to have a background task?

Open alexcrichton opened this issue 10 months ago • 2 comments

I believe the answer is "no", but I wanted to confirm. I believe this is likely used by libraries that do some sort of connection pooling or similar where a background task might be performing maintenance on behalf of the pool or similar. This is somewhat tangentially related to https://github.com/WebAssembly/component-model/issues/459 as well.

alexcrichton avatar Feb 28 '25 22:02 alexcrichton

I think that's what this PR is about.

dicej avatar Feb 28 '25 22:02 dicej

Ah I've been a bit oblivious of everything start related since it's not implemented in Wasmtime and probably won't be for some time, but despite that I also think that may not necessarily work for the use cases I'm thinking of where it would require restructuring libraries to expose pools/background tasks where they're probably currently internal today. We can talk more about this in the sync next week though

alexcrichton avatar Feb 28 '25 23:02 alexcrichton