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

CoreFoundation thread safety #696

Open
madsmtm opened this issue Jan 11, 2025 · 0 comments
Open

CoreFoundation thread safety #696

madsmtm opened this issue Jan 11, 2025 · 0 comments
Labels
A-framework Affects the framework crates and the translator for them enhancement New feature or request

Comments

@madsmtm
Copy link
Owner

madsmtm commented Jan 11, 2025

Some types like CFRunLoop, CFRunLoopTimer, CFRunLoopSource etc. are thread safe, and should be safe for us to mark Send + Sync as well, except for the fact that any callbacks set via CFRunLoopAddSource/CFRunLoopAddObserver/CFRunLoopAddTimer are not necessarily guaranteed to be thread safe.

Can we assume that that is a guarantee, and then mark the types as Send + Sync?

See also servo/core-foundation-rs#649.

@madsmtm madsmtm added enhancement New feature or request A-framework Affects the framework crates and the translator for them labels Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-framework Affects the framework crates and the translator for them enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant