-
-
Notifications
You must be signed in to change notification settings - Fork 76
CoreFoundation thread safety #696
Copy link
Copy link
Open
Labels
A-frameworkAffects the framework crates and the translator for themAffects the framework crates and the translator for themI-unsoundA soundness hole, or affecting soundnessA soundness hole, or affecting soundnessenhancementNew feature or requestNew feature or request
Milestone
Description
Metadata
Metadata
Assignees
Labels
A-frameworkAffects the framework crates and the translator for themAffects the framework crates and the translator for themI-unsoundA soundness hole, or affecting soundnessA soundness hole, or affecting soundnessenhancementNew feature or requestNew feature or request
Some types like
CFRunLoop,CFRunLoopTimer,CFRunLoopSourceetc. are thread safe, and should be safe for us to markSend + Syncas well, except for the fact that any callbacks set viaCFRunLoopAddSource/CFRunLoopAddObserver/CFRunLoopAddTimerare 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 and servo/core-foundation-rs#448.
Difficulty: Some objects are toll-free bridged (#693) with the Objective-C variants, and those are usually not thread-safe.