Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[browser] JSMarshalAs(JSType.Function) support for Task #101913

Open
kekekeks opened this issue May 6, 2024 · 1 comment
Open

[browser] JSMarshalAs(JSType.Function) support for Task #101913

kekekeks opened this issue May 6, 2024 · 1 comment
Assignees
Milestone

Comments

@kekekeks
Copy link

kekekeks commented May 6, 2024

We actively utilize JSType.Function for JS->managed callbacks and encountering problems when trying to add support for multithreaded mode: MT requires JS->managed calls to be async, however returning Task type doesn't work for JSType.Function:

Error SYSLIB1072 : The type 'System.Func<System.Threading.Tasks.Task>' is not supported by source-generated JavaScript interop.
The generated source will not handle marshalling of parameter 'callback'.
For more information see https://aka.ms/dotnet-wasm-jsinterop

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label May 6, 2024
@kekekeks
Copy link
Author

kekekeks commented May 6, 2024

@pavelsavara

@pavelsavara pavelsavara self-assigned this May 6, 2024
@pavelsavara pavelsavara changed the title [browser][MT] JSMarshalAs(JSType.Function) has problems with MT mode because marshaller doesn't support Task return for managed callbacks [browser] JSMarshalAs(JSType.Function) support for Task May 6, 2024
@lewing lewing added this to the 9.0.0 milestone May 6, 2024
@lewing lewing removed the untriaged New issue has not been triaged by the area owner label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants