Skip to content

Commit 3d68d46

Browse files
committed
Change the type of DISPATCH_QUEUE_CONCURRENT.
Turns out I could only get away with this because of a type checking bug; if you try to add a cast to dispatch_queue_attr_t the compiler will start to complain about 'shared static variables must have a type that implements Sync'. Discovered in rust-lang/rust#33130.
1 parent e60ae80 commit 3d68d46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ffi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ pub fn dispatch_get_main_queue() -> dispatch_queue_t {
132132
}
133133

134134
pub const DISPATCH_QUEUE_SERIAL: dispatch_queue_attr_t = 0 as dispatch_queue_attr_t;
135-
pub static DISPATCH_QUEUE_CONCURRENT: dispatch_queue_attr_t = &_dispatch_queue_attr_concurrent;
135+
pub static DISPATCH_QUEUE_CONCURRENT: &'static dispatch_object_s = &_dispatch_queue_attr_concurrent;
136136

137137
pub const DISPATCH_QUEUE_PRIORITY_HIGH: c_long = 2;
138138
pub const DISPATCH_QUEUE_PRIORITY_DEFAULT: c_long = 0;

0 commit comments

Comments
 (0)