Skip to content

Commit 1957e57

Browse files
authored
Merge pull request #1043 from TitanNano/jovan/async_rt
Async Signals
2 parents 265658d + 8f4122e commit 1957e57

File tree

13 files changed

+1357
-64
lines changed

13 files changed

+1357
-64
lines changed

godot-core/src/init/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,9 @@ fn gdext_on_level_deinit(level: InitLevel) {
172172
// If lowest level is unloaded, call global deinitialization.
173173
// No business logic by itself, but ensures consistency if re-initialization (hot-reload on Linux) occurs.
174174

175+
#[cfg(since_api = "4.2")]
176+
crate::task::cleanup();
177+
175178
// Garbage-collect various statics.
176179
// SAFETY: this is the last time meta APIs are used.
177180
unsafe {

godot-core/src/lib.rs

+4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ pub mod init;
2727
pub mod meta;
2828
pub mod obj;
2929
pub mod registry;
30+
#[cfg(since_api = "4.2")]
31+
pub mod task;
32+
#[cfg(before_api = "4.2")]
33+
pub mod task {}
3034
pub mod tools;
3135

3236
mod storage;

godot-core/src/registry/signal/typed_signal.rs

+4
Original file line numberDiff line numberDiff line change
@@ -207,4 +207,8 @@ impl<'c, C: WithBaseField, Ps: meta::ParamTuple> TypedSignal<'c, C, Ps> {
207207
c.done();
208208
});
209209
}
210+
211+
pub(crate) fn to_untyped(&self) -> crate::builtin::Signal {
212+
crate::builtin::Signal::from_object_signal(&self.receiver_object(), &*self.name)
213+
}
210214
}

0 commit comments

Comments
 (0)