mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Add thread safety to Object signals
* It turns out the majority of this work was done already by AThousandShips as part of #89451. This allows to do lock-less emitting of signals. * This means, that only the signal map needs to be protected, making the task simple and without risk of deadlocks, or affecting performance. * Objects can choose to not protect signals for performance (as example Node uses thread guards for protection, so these signals are not thread safe).
This commit is contained in:
@@ -387,6 +387,8 @@ protected:
|
||||
void _validate_property(PropertyInfo &p_property) const;
|
||||
|
||||
protected:
|
||||
virtual bool _uses_signal_mutex() const override { return false; } // Node uses thread guards instead.
|
||||
|
||||
virtual void input(const Ref<InputEvent> &p_event);
|
||||
virtual void shortcut_input(const Ref<InputEvent> &p_key_event);
|
||||
virtual void unhandled_input(const Ref<InputEvent> &p_event);
|
||||
|
||||
Reference in New Issue
Block a user