-
-
Notifications
You must be signed in to change notification settings - Fork 224
Gd<T>
cannot be passed as a parameter in async signals.
#1074
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
Comments
Originally posted by @TitanNano in #1043 (comment) |
I have started looking into a solution for this. |
My recommendation is: https://github.com/smol-rs/async-task From the discussion it seems like the plan is to check thread ids. Might also help reduce boiler plate for the gdext async runtime implementation. |
Whatever we end up choosing, the API should follow the principle "easy-to-use for the common case, verbose for the rare cases". I'd argue that 95%+ of users emit signals on the same thread that they await. Needing to go through extra hoops for passing We could have I also don't think we should make large-scale sweeping changes to threading across the library, or block this particular on #18 being solved. It seems this issue is isolated enough that we could solve the smaller problem, like we did for callables and typed signals? |
Please note: The problem does not originate in the async runtime. The bound is caused by the My counterproposal is that we check if the signal argument is being sent across threads and also Here is a POC how that could be implemented: TitanNano@798d222 As you can see, nothing changes for the user, but now you can await signals with arguments that are not |
It is unrelated to whether the signal is type-safe.
Originally posted by @Bromeon in #1043 (comment)
The text was updated successfully, but these errors were encountered: