-
Notifications
You must be signed in to change notification settings - Fork 235
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
UDL support for async methods #1716
Comments
WIthin the docs currently:
|
Ah, quite right. Well then, here's the bug. :) My 'need' is based on consuming the C# generator, which doesn't support the attribute syntax at all. |
Does the C# generate support async in general? I think that's also an issue. But I do think we should support async methods in the UDL. I was thinking about this the other day and realized I don't like the standard method for this:
... since that implies that any type could be wrapped in a promise including arguments. We currently have no generalized method of moving a
What do others think? |
hrm - is there ever a future where we do support this?
I'm fine with that TBH, and always assumed that's what we'd do - I forgot about (I guess it's also not an either-or option - there's no reason we couldn't add support for |
I don't suppose it could, since it doesn't support attributes and that's the only way to do async today. |
I think that could be very nice, although we would need a lot of other things in place, like the ability for foreign code to define a promise value. Maybe once we do async callback interface methods and more on traits we could look at it. Also, and I'm not sure of this, but don't some of the foreign languages distinguish between an async function and a function that returns a Future? I think Swift does. So maybe we would want to support both |
On a more practical level, I'm currently working towards adding support for async callback interface methods. That's going to require some async_trait style workarounds at the Rust level. I think once that's done it would be a good time to add UDL async support. |
The User's Guide only tells how to define async functions when using attributes. How can I define async functions when using the .udl file?
The text was updated successfully, but these errors were encountered: