Skip to content
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

Allow using MainThreadMarker in extern_methods! #416

Merged
merged 1 commit into from
Jul 29, 2023

Conversation

madsmtm
Copy link
Owner

@madsmtm madsmtm commented Feb 1, 2023

Required for #359.

Unsure if this can be supported in declare_class!.

@madsmtm madsmtm added enhancement New feature or request A-objc2 Affects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` crates labels Feb 1, 2023
@madsmtm madsmtm added this to the objc2 v0.3 milestone Feb 1, 2023
@madsmtm madsmtm force-pushed the mainthreadmarker-in-extern-methods branch from d817eff to 7e26dbe Compare February 1, 2023 14:10
@madsmtm
Copy link
Owner Author

madsmtm commented Mar 27, 2023

Alternative: Move MainThreadMarker into objc2 + make some trait that allows it to be skipped as an argument in msg_send!

@madsmtm madsmtm modified the milestones: objc2 v0.4, icrate v0.1.0 Apr 21, 2023
@madsmtm
Copy link
Owner Author

madsmtm commented Jul 29, 2023

Yet another alternative: Handle this outside of extern_methods!, and instead push the user to define their own wrapper methods.

@madsmtm madsmtm force-pushed the mainthreadmarker-in-extern-methods branch from 7e26dbe to d90209d Compare July 29, 2023 06:15
@madsmtm madsmtm force-pushed the mainthreadmarker-in-extern-methods branch from d90209d to 962e7a5 Compare July 29, 2023 06:20
@madsmtm madsmtm merged commit ce6100c into master Jul 29, 2023
@madsmtm madsmtm deleted the mainthreadmarker-in-extern-methods branch July 29, 2023 06:45
@madsmtm
Copy link
Owner Author

madsmtm commented Jul 29, 2023

Although I don't really like it, I went with it for now, then if we get something like contexts and capabilities then we can rethink this.

Also, it may be valuable to do this for AutoreleasePool as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-objc2 Affects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` crates enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant