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

Async/Await #640

Open
OptimusLime opened this issue Mar 6, 2024 · 2 comments
Open

Async/Await #640

OptimusLime opened this issue Mar 6, 2024 · 2 comments
Labels
c: core Core components feature Adds functionality to the library

Comments

@OptimusLime
Copy link

As I understand it, the base Godot C++ GDExtension library doesn't handle async/yield. I recognize that gdext doesn't have the functionality either, even though gdnative version of godot-rust was able to do it.

  1. Is it even possible to get an await call to work?
  2. What would be the simplest way to enable this, even if it's not ideal?

Any hints for how to do this in gdext would be amazing, thank you!

@coder137
Copy link

coder137 commented Mar 6, 2024

@OptimusLime Maybe this thread can help? https://discord.com/channels/723850269347283004/1213264585725837364/1213264585725837364

Basically smol::LocalExecutor and its try_tick function should work here

@Bromeon Bromeon added feature Adds functionality to the library c: core Core components labels Mar 6, 2024
@Bromeon
Copy link
Member

Bromeon commented Mar 6, 2024

There are a few people on Discord who have experimented with async, and there's also prior art in the gdnative project with its gdnative::task module.

But for me personally, async support is not a priority in the library, there are many other things I'd like to do first. For example, coming up with a better threading model might also help for some questions in async. So, unless someone is willing to spend the time on this, don't expect there to be much progress this year 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: core Core components feature Adds functionality to the library
Projects
None yet
Development

No branches or pull requests

3 participants