-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Can't call emit_signal()
within a Thread in 4.X.
#81148
Comments
I didn't realize #78000 was already merged. I guess it's intended that signals are not thread safe. |
I don't think disabling thread safety checks is correct here. You should defer emitting the signal as suggested by the error. |
@akien-mga Though for the very specific purpose that I'm using it for, awaiting/yielding on the thread directly is required. Come to think of it, there may not be many contexts where this is absolutely needed. |
It's possible the new thread safety check is correct, but it's also possible it's a bit too strict. It's a relatively new feature, so we might have missed something. These kind of issues were the reason But we probably need someone from the core team to evaluate these thread guard issues. For the record, this is where the error check fails: Line 3579 in f7c48cf
|
In GDExtension C++, I got the same error while trying to call Change from
to
worked for me. |
Godot version
4.1
System information
Windows 10
Issue description
Simple as the title describes, not sure if this is intended now but it sure is annoying that it's no longer possible.
The Error that is Thrown:
Steps to reproduce
the code which throws said error:
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: