Skip to content

Commit 8e9a9fb

Browse files
committed
Conservatively mark NSOperationQueue as unsafe as argument
1 parent 91eda4c commit 8e9a9fb

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

crates/header-translator/src/rust_type.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,6 +1019,11 @@ impl PointeeTy {
10191019
Self::DispatchTypeDef { id, .. } if id.name == "DispatchQueue" => {
10201020
TypeSafety::unknown_in_argument("possibly has additional threading requirements")
10211021
}
1022+
// Unsure if operation queues are thread-safe? Do blocks added to
1023+
// it have to be sendable?
1024+
Self::Class { id, .. } if id.name == "NSOperationQueue" => {
1025+
TypeSafety::unknown_in_argument("possibly has additional threading requirements")
1026+
}
10221027
// `objc2` ensures that objects are initialized before being
10231028
// allowed as references.
10241029
Self::Class {

0 commit comments

Comments
 (0)