Skip to content

Async Signals #1043

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

Merged
merged 3 commits into from
Mar 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions godot-core/src/init/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ fn gdext_on_level_deinit(level: InitLevel) {
// If lowest level is unloaded, call global deinitialization.
// No business logic by itself, but ensures consistency if re-initialization (hot-reload on Linux) occurs.

#[cfg(since_api = "4.2")]
crate::task::cleanup();

// Garbage-collect various statics.
// SAFETY: this is the last time meta APIs are used.
unsafe {
Expand Down
4 changes: 4 additions & 0 deletions godot-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ pub mod init;
pub mod meta;
pub mod obj;
pub mod registry;
#[cfg(since_api = "4.2")]
pub mod task;
#[cfg(before_api = "4.2")]
pub mod task {}
pub mod tools;

mod storage;
Expand Down
4 changes: 4 additions & 0 deletions godot-core/src/registry/signal/typed_signal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,4 +207,8 @@ impl<'c, C: WithBaseField, Ps: meta::ParamTuple> TypedSignal<'c, C, Ps> {
c.done();
});
}

pub(crate) fn to_untyped(&self) -> crate::builtin::Signal {
crate::builtin::Signal::from_object_signal(&self.receiver_object(), &*self.name)
}
}
Loading
Loading